diff --git a/Dist/launch-scripts.nix b/Dist/launch-scripts.nix index e616d7145a..27b54d6e8b 100644 --- a/Dist/launch-scripts.nix +++ b/Dist/launch-scripts.nix @@ -30,10 +30,10 @@ * call as `redirect-output-to-files /target/stdout.txt /target/stderr.txt /path/to/bin arg1 arg2...` */ redirectOutputToFiles = writeShellScript "redirect-output-to-files" '' - mktemp='${lib.getBin mktemp}/bin/mktemp' + mktemp='${lib.getExe' mktemp "mktemp"}' o="$("$mktemp" -u)" e="$("$mktemp" -u)" - '${lib.getBin mkfifo}/bin/mkfifo' "$o" "$e" + '${lib.getExe' mkfifo "mkfifo"}' "$o" "$e" tee "$1" <"$o" & shift tee "$1" <"$e" | sed "s/.*/$(tput setaf 1)&$(tput sgr0)/" >&2 & @@ -112,7 +112,7 @@ fi printf "(capturing output in %s/EmuHawkMono_last*.txt)\n" "$PWD" >&2 exec '${redirectOutputToFiles}' EmuHawkMono_laststdout.txt EmuHawkMono_laststderr.txt \ - '${lib.getBin bizhawkAssemblies.mono}/bin/mono'${monoProfilerFlag} \ + '${lib.getExe bizhawkAssemblies.mono}'${monoProfilerFlag} \ "$mainAppPath" --config=config.json "$@" ''; in { @@ -137,7 +137,7 @@ in { ${if profileManagedCalls == false then "" else ''printf "Will write profiling results to %s/*.mlpd\n" "$PWD" ''}export MONO_PATH="$BIZHAWK_HOME/dll" ${lib.optionalString (!debugPInvokes) "# "}export MONO_LOG_LEVEL=debug MONO_LOG_MASK=dll # pass `--arg debugPInvokes true` to nix-build to enable - exec '${lib.getBin bizhawkAssemblies.mono}/bin/mono'${monoProfilerFlag} \ + exec '${lib.getExe bizhawkAssemblies.mono}'${monoProfilerFlag} \ "$BIZHAWK_HOME/DiscoHawk.exe" "$@" ''; emuhawkNonNixOS = writeShellScript "emuhawk-mono-wrapper-non-nixos" ''exec '${nixGL}/bin/nixGL' '${emuhawk}' "$@"''; diff --git a/default.nix b/default.nix index bf57ad7435..21eda89f9f 100644 --- a/default.nix +++ b/default.nix @@ -114,7 +114,7 @@ in { git gnome-themes-extra gtk2-x11 libgdiplus libGL lua openal SDL2 udev zstd buildConfig doCheck extraDefines extraDotnetBuildFlags; - mono = if mono != null + mono = lib.recursiveUpdate { meta.mainProgram = "mono"; } (if mono != null then mono # allow older Mono if set explicitly else if isVersionAtLeast "6.12.0.151" pkgs.mono.version then pkgs.mono @@ -122,7 +122,7 @@ in { (import (fetchzip { url = "https://github.com/NixOS/nixpkgs/archive/23.05.tar.gz"; hash = "sha512-REPJ9fRKxTefvh1d25MloT4bXJIfxI+1EvfVWq644Tzv+nuq2BmiGMiBNmBkyN9UT5fl2tdjqGliye3gZGaIGg=="; - }) { inherit system; }).mono; + }) { inherit system; }).mono); monoBasic = fetchzip { url = "https://download.mono-project.com/repo/debian/pool/main/m/mono-basic/libmono-microsoft-visualbasic10.0-cil_4.7-0xamarin3+debian9b1_all.deb"; nativeBuildInputs = [ dpkg ];