diff --git a/flake.nix b/flake.nix index 7e0da5bdf..49dcd9056 100644 --- a/flake.nix +++ b/flake.nix @@ -34,7 +34,7 @@ in pkgs.lib.all (re: builtins.match re relPath == null) regexes; }; - + rust-version = pkgs.rust-bin.stable."1.71.0".default; ourRustPlatform = pkgs.makeRustPlatform { @@ -42,10 +42,6 @@ cargo = rust-version; }; - # NOTE (aseipp): on Linux, go ahead and use mold by default to improve - # link times a bit; mostly useful for debug build speed, but will help - # over time if we ever get more dependencies, too - useMoldLinker = pkgs.stdenv.isLinux; in { packages = { @@ -132,16 +128,12 @@ cargo-insta cargo-nextest cargo-watch - - # Extra, more specific tools follow - ] ++ pkgs.lib.optionals useMoldLinker [ mold ]; + ]; shellHook = '' export RUST_BACKTRACE=1 export ZSTD_SYS_USE_PKG_CONFIG=1 export LIBSSH2_SYS_USE_PKG_CONFIG=1 - '' + pkgs.lib.optionalString useMoldLinker '' - export RUSTFLAGS="-C link-arg=-fuse-ld=mold $RUSTFLAGS" ''; }; }));