diff --git a/pkgs/by-name/ne/nexusmods-app/package.nix b/pkgs/by-name/ne/nexusmods-app/package.nix index 0e67d7fd783bb..9c46d05b25cb1 100644 --- a/pkgs/by-name/ne/nexusmods-app/package.nix +++ b/pkgs/by-name/ne/nexusmods-app/package.nix @@ -8,6 +8,7 @@ fetchgit, imagemagick, lib, + makeFontsConf, runCommand, xdg-utils, pname ? "nexusmods-app", @@ -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" ''