about summary refs log tree commit diff
path: root/nixpkgs/pkgs/build-support/rust/hooks/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/build-support/rust/hooks/default.nix')
-rw-r--r--nixpkgs/pkgs/build-support/rust/hooks/default.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/build-support/rust/hooks/default.nix b/nixpkgs/pkgs/build-support/rust/hooks/default.nix
index 205d085d3507..7703ff4abad4 100644
--- a/nixpkgs/pkgs/build-support/rust/hooks/default.nix
+++ b/nixpkgs/pkgs/build-support/rust/hooks/default.nix
@@ -13,7 +13,7 @@
 # This confusingly-named parameter indicates the *subdirectory of
 # `target/` from which to copy the build artifacts.  It is derived
 # from a stdenv platform (or a JSON file).
-, target ? rust.lib.toRustTargetSpecShort stdenv.hostPlatform
+, target ? stdenv.hostPlatform.rust.cargoShortTarget
 }:
 
 {
@@ -65,10 +65,10 @@
         diff = "${lib.getBin buildPackages.diffutils}/bin/diff";
 
         cargoConfig = ''
-          [target."${rust.toRustTarget stdenv.buildPlatform}"]
+          [target."${stdenv.buildPlatform.rust.rustcTarget}"]
           "linker" = "${rust.envVars.ccForBuild}"
           ${lib.optionalString (stdenv.buildPlatform.config != stdenv.hostPlatform.config) ''
-            [target."${rust.toRustTarget stdenv.hostPlatform}"]
+            [target."${stdenv.hostPlatform.rust.rustcTarget}"]
             "linker" = "${rust.envVars.ccForHost}"
           ''}
           "rustflags" = [ "-C", "target-feature=${if stdenv.hostPlatform.isStatic then "+" else "-"}crt-static" ]