Skip to content

Commit c50a4f4

Browse files
committed
Nix expr: Use lib.getExe
1 parent 2cb6d2c commit c50a4f4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Dist/launch-scripts.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
* call as `redirect-output-to-files /target/stdout.txt /target/stderr.txt /path/to/bin arg1 arg2...`
3131
*/
3232
redirectOutputToFiles = writeShellScript "redirect-output-to-files" ''
33-
mktemp='${lib.getBin mktemp}/bin/mktemp'
33+
mktemp='${lib.getExe' mktemp "mktemp"}'
3434
o="$("$mktemp" -u)"
3535
e="$("$mktemp" -u)"
36-
'${lib.getBin mkfifo}/bin/mkfifo' "$o" "$e"
36+
'${lib.getExe' mkfifo "mkfifo"}' "$o" "$e"
3737
tee "$1" <"$o" &
3838
shift
3939
tee "$1" <"$e" | sed "s/.*/$(tput setaf 1)&$(tput sgr0)/" >&2 &
@@ -112,7 +112,7 @@
112112
fi
113113
printf "(capturing output in %s/EmuHawkMono_last*.txt)\n" "$PWD" >&2
114114
exec '${redirectOutputToFiles}' EmuHawkMono_laststdout.txt EmuHawkMono_laststderr.txt \
115-
'${lib.getBin bizhawkAssemblies.mono}/bin/mono'${monoProfilerFlag} \
115+
'${lib.getExe bizhawkAssemblies.mono}'${monoProfilerFlag} \
116116
"$mainAppPath" --config=config.json "$@"
117117
'';
118118
in {
@@ -137,7 +137,7 @@ in {
137137
${if profileManagedCalls == false then "" else ''printf "Will write profiling results to %s/*.mlpd\n" "$PWD"
138138
''}export MONO_PATH="$BIZHAWK_HOME/dll"
139139
${lib.optionalString (!debugPInvokes) "# "}export MONO_LOG_LEVEL=debug MONO_LOG_MASK=dll # pass `--arg debugPInvokes true` to nix-build to enable
140-
exec '${lib.getBin bizhawkAssemblies.mono}/bin/mono'${monoProfilerFlag} \
140+
exec '${lib.getExe bizhawkAssemblies.mono}'${monoProfilerFlag} \
141141
"$BIZHAWK_HOME/DiscoHawk.exe" "$@"
142142
'';
143143
emuhawkNonNixOS = writeShellScript "emuhawk-mono-wrapper-non-nixos" ''exec '${nixGL}/bin/nixGL' '${emuhawk}' "$@"'';

default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,15 @@ in {
114114
git
115115
gnome-themes-extra gtk2-x11 libgdiplus libGL lua openal SDL2 udev zstd
116116
buildConfig doCheck extraDefines extraDotnetBuildFlags;
117-
mono = if mono != null
117+
mono = lib.recursiveUpdate { meta.mainProgram = "mono"; } (if mono != null
118118
then mono # allow older Mono if set explicitly
119119
else if isVersionAtLeast "6.12.0.151" pkgs.mono.version
120120
then pkgs.mono
121121
else lib.trace "provided Mono too old, using Mono from Nixpkgs 23.05"
122122
(import (fetchzip {
123123
url = "https://github.com/NixOS/nixpkgs/archive/23.05.tar.gz";
124124
hash = "sha512-REPJ9fRKxTefvh1d25MloT4bXJIfxI+1EvfVWq644Tzv+nuq2BmiGMiBNmBkyN9UT5fl2tdjqGliye3gZGaIGg==";
125-
}) { inherit system; }).mono;
125+
}) { inherit system; }).mono);
126126
monoBasic = fetchzip {
127127
url = "https://download.mono-project.com/repo/debian/pool/main/m/mono-basic/libmono-microsoft-visualbasic10.0-cil_4.7-0xamarin3+debian9b1_all.deb";
128128
nativeBuildInputs = [ dpkg ];

0 commit comments

Comments
 (0)