diff --git a/flake.nix b/flake.nix index bbafd1cde1..b33e60bec4 100644 --- a/flake.nix +++ b/flake.nix @@ -176,9 +176,11 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1 export RUSTFLAGS="-Zthreads=0" - '' + pkgs.lib.optionalString useMoldLinker '' + '' + (if pkgs.stdenv.isLinux then '' export RUSTFLAGS+=" -C link-arg=-fuse-ld=mold -C link-arg=-Wl,--compress-debug-sections=zstd" - '' + darwinNextestHack; + '' else '' + export RUSTFLAGS+=" -C link-arg=-fuse-ld=/usr/bin/ld -C link-arg=-ld_new" + '') + darwinNextestHack; }; })); }