Skip to content

Commit

Permalink
nexusmods-app: fix passthru tests (NixOS#354018)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksanaa authored Dec 10, 2024
2 parents 389452a + 0462ffb commit 512ea53
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions pkgs/by-name/ne/nexusmods-app/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
fetchgit,
imagemagick,
lib,
makeFontsConf,
runCommand,
xdg-utils,
pname ? "nexusmods-app",
Expand Down Expand Up @@ -146,10 +147,22 @@ buildDotnetModule (finalAttrs: {
let
runTest =
name: script:
runCommand "${pname}-test-${name}" { nativeBuildInputs = [ finalAttrs.finalPackage ]; } ''
${script}
touch $out
'';
runCommand "${pname}-test-${name}"
{
nativeBuildInputs = [ finalAttrs.finalPackage ];
FONTCONFIG_FILE = makeFontsConf {
fontDirectories = [ ];
};
}
''
export XDG_DATA_HOME="$PWD/data"
export XDG_STATE_HOME="$PWD/state"
export XDG_CACHE_HOME="$PWD/cache"
mkdir -p "$XDG_DATA_HOME" "$XDG_STATE_HOME" "$XDG_CACHE_HOME"
# TODO: on error, print $XDG_STATE_HOME/NexusMods.App/Logs/nexusmods.app.main.current.log
${script}
touch $out
'';
in
{
serve = runTest "serve" ''
Expand Down

0 comments on commit 512ea53

Please sign in to comment.