Nix expr: Fix running tests in nix-shell

This commit is contained in:
James Groom 2024-03-07 03:11:13 +00:00 committed by GitHub
parent 07d1c41712
commit e8a3b7b250
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 2 deletions

View File

@ -16,6 +16,7 @@
# makedeps
, git
# rundeps
, libgdiplus
, libGL
, lua
, mono
@ -62,7 +63,7 @@
'';
dontFixup = true;
};
genDepsHostTargetFor = { hawkSourceInfo, mono' ? mono }: [ lua mono' openal (lib.getOutput "out" zstd) ]
genDepsHostTargetFor = { hawkSourceInfo, mono' ? mono }: [ libgdiplus lua mono' openal (lib.getOutput "out" zstd) ]
++ lib.optionals hawkSourceInfo.needsSDL [ SDL2 (lib.getOutput "out" udev) ]
++ lib.optional hawkSourceInfo.needsLibGLVND (lib.getOutput "out" libGL);
/**

View File

@ -31,6 +31,7 @@ in {
, git ? pkgs.gitMinimal # only when building from-CWD (`-local`)
# rundeps
, coreutils ? pkgs.coreutils
, libgdiplus ? pkgs.libgdiplus
, libGL ? pkgs.libGL
, lua ? pkgs.lua54Packages.lua
, mono ? null
@ -92,7 +93,7 @@ in {
buildDotnetModule fetchpatch fetchzip hardLinkJoin launchScriptsFor makeDesktopItem
releaseTagSourceInfos runCommand symlinkJoin writeShellScriptBin
git
libGL lua openal SDL2 udev zstd
libgdiplus libGL lua openal SDL2 udev zstd
buildConfig doCheck emuhawkBuildFlavour extraDefines extraDotnetBuildFlags;
mono = if mono != null
then mono # allow older Mono if set explicitly

View File

@ -23,6 +23,12 @@
shellHook = ''
export BIZHAWKBUILD_HOME='${builtins.toString ./.}'
export BIZHAWK_HOME="$BIZHAWKBUILD_HOME/output"
ldLibPath='${lib.makeLibraryPath bizhawkAssemblies.buildInputs}' # for running tests
if [ -z "$LD_LIBRARY_PATH" ]; then
export LD_LIBRARY_PATH="$ldLibPath"
else
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ldLibPath"
fi
alias discohawk-monort-local='${avail.launchScriptsForLocalBuild.discohawk}'
alias emuhawk-monort-local='${avail.launchScriptsForLocalBuild.emuhawk}'
pfx="$(realpath --relative-to="$PWD" "$BIZHAWKBUILD_HOME")/"