Skip to content

Commit af6d100

Browse files
authored
Merge pull request #1545 from cryspen/fix-mac-nix
fix(nix): make `nix run` work on darwin
2 parents 7df69e3 + 4597a9c commit af6d100

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cli/default.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ in stdenv.mkDerivation {
8282
makeWrapper ${hax}/bin/cargo-hax $out/bin/cargo-hax \
8383
--prefix PATH : ${lib.makeBinPath binaries} \
8484
${
85-
if stdenv.hostPlatform.isDarwin then
86-
"--suffix DYLD_LIBRARY_PATH : ${lib.makeLibraryPath [ libz rustc ]}"
87-
else
88-
""
85+
lib.optionalString stdenv.isDarwin ''
86+
--prefix RUSTFLAGS : "-C link-arg=-L${libiconv}/lib" \
87+
--suffix DYLD_LIBRARY_PATH : ${lib.makeLibraryPath [ libz rustc ]}
88+
''
8989
}
9090
'';
9191
meta.mainProgram = "cargo-hax";

0 commit comments

Comments
 (0)