From faaf21bc668713a51a0867e7663adb6095806e0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asger=20Juul=20Brunsh=C3=B8j?= Date: Tue, 4 Jun 2024 10:23:43 +0200 Subject: [PATCH] in flake mkShell default RUSTFLAGS to an empty string if unset --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index e113d94b9975..db6c9a1f28d2 100644 --- a/flake.nix +++ b/flake.nix @@ -116,7 +116,7 @@ else pkgs.clangStdenv; rustFlagsEnv = if stdenv.isLinux - then ''$RUSTFLAGS -C link-arg=-fuse-ld=lld -C target-cpu=native -Clink-arg=-Wl,--no-rosegment'' + then ''''${RUSTFLAGS:-""} -C link-arg=-fuse-ld=lld -C target-cpu=native -Clink-arg=-Wl,--no-rosegment'' else "$RUSTFLAGS"; rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; craneLibMSRV = (crane.mkLib pkgs).overrideToolchain rustToolchain;