about summary refs log tree commit diff
path: root/pkgs/development/compilers/rust/rustfmt.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/rust/rustfmt.nix')
-rw-r--r--pkgs/development/compilers/rust/rustfmt.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/compilers/rust/rustfmt.nix b/pkgs/development/compilers/rust/rustfmt.nix
index ab58a172a6b2..42c71513151a 100644
--- a/pkgs/development/compilers/rust/rustfmt.nix
+++ b/pkgs/development/compilers/rust/rustfmt.nix
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
 
   buildInputs = [
     rustc.llvm
-  ] ++ lib.optional stdenv.isDarwin Security;
+  ] ++ lib.optional stdenv.hostPlatform.isDarwin Security;
 
   # rustfmt uses the rustc_driver and std private libraries, and Rust's build process forces them to have
   # an install name of `@rpath/...` [0] [1] instead of the standard on macOS, which is an absolute path
@@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec {
   #
   # [0]: https://github.com/rust-lang/rust/blob/f77f4d55bdf9d8955d3292f709bd9830c2fdeca5/src/bootstrap/builder.rs#L1543
   # [1]: https://github.com/rust-lang/rust/blob/f77f4d55bdf9d8955d3292f709bd9830c2fdeca5/compiler/rustc_codegen_ssa/src/back/linker.rs#L323-L331
-  preFixup = lib.optionalString stdenv.isDarwin ''
+  preFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
     install_name_tool -add_rpath "${rustc.unwrapped}/lib" "$out/bin/rustfmt"
     install_name_tool -add_rpath "${rustc.unwrapped}/lib" "$out/bin/git-rustfmt"
   '';