nix: fix stdenv.isLinux deprecation warning (#16189)

This commit is contained in:
Vinicius Deolindo authored and GitHub committed 2026-09-29 11:31:44 +09:00
1 parent 8d687c547c
commit e0842e6aae
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -60,7 +60,7 @@
lib.mapAttrs (system: pkgs: {
default = let
commonRustFlagsEnv = "-C link-arg=-fuse-ld=lld -C target-cpu=native --cfg tokio_unstable";
platformRustFlagsEnv = lib.optionalString pkgs.stdenv.isLinux "-Clink-arg=-Wl,--no-rosegment";
platformRustFlagsEnv = lib.optionalString pkgs.stdenv.hostPlatform.isLinux "-Clink-arg=-Wl,--no-rosegment";
in
pkgs.mkShell {
inputsFrom = [
@@ -75,8 +75,8 @@
rust-bin.nightly.latest.rust-analyzer
mdbook
]
++ (lib.optional (stdenv.isx86_64 && stdenv.isLinux) cargo-tarpaulin)
++ (lib.optional stdenv.isLinux lldb);
++ (lib.optional (stdenv.isx86_64 && stdenv.hostPlatform.isLinux) cargo-tarpaulin)
++ (lib.optional stdenv.hostPlatform.isLinux lldb);
shellHook = ''
export RUST_BACKTRACE="1"
export RUSTFLAGS="''${RUSTFLAGS:-""} ${commonRustFlagsEnv} ${platformRustFlagsEnv}"
+1 -1
View File
@@ -98,7 +98,7 @@
'';
# Strip failed on darwin: strip: error: symbols referenced by indirect symbol table entries that can't be stripped
fixupPhase = lib.optionalString stdenv.isLinux ''
fixupPhase = lib.optionalString stdenv.hostPlatform.isLinux ''
runHook preFixup
$STRIP $out/$SHARED_LIB
runHook postFixup