about summary refs log tree commit diff
path: root/nixpkgs
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs')
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/1_44.nix1
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/1_45.nix1
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/1_46.nix1
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/default.nix19
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/make-rust-platform.nix21
-rw-r--r--nixpkgs/pkgs/top-level/all-packages.nix3
6 files changed, 27 insertions, 19 deletions
diff --git a/nixpkgs/pkgs/development/compilers/rust/1_44.nix b/nixpkgs/pkgs/development/compilers/rust/1_44.nix
index fca6a677ddab..3ca61529d19f 100644
--- a/nixpkgs/pkgs/development/compilers/rust/1_44.nix
+++ b/nixpkgs/pkgs/development/compilers/rust/1_44.nix
@@ -13,6 +13,7 @@
 , CoreFoundation, Security
 , llvmPackages
 , pkgsBuildTarget, pkgsBuildBuild
+, makeRustPlatform
 } @ args:
 
 import ./default.nix {
diff --git a/nixpkgs/pkgs/development/compilers/rust/1_45.nix b/nixpkgs/pkgs/development/compilers/rust/1_45.nix
index 41c380174aef..94c70880dbaa 100644
--- a/nixpkgs/pkgs/development/compilers/rust/1_45.nix
+++ b/nixpkgs/pkgs/development/compilers/rust/1_45.nix
@@ -13,6 +13,7 @@
 , CoreFoundation, Security
 , llvmPackages
 , pkgsBuildTarget, pkgsBuildBuild
+, makeRustPlatform
 } @ args:
 
 import ./default.nix {
diff --git a/nixpkgs/pkgs/development/compilers/rust/1_46.nix b/nixpkgs/pkgs/development/compilers/rust/1_46.nix
index 04954a043bf8..c999b346ee6f 100644
--- a/nixpkgs/pkgs/development/compilers/rust/1_46.nix
+++ b/nixpkgs/pkgs/development/compilers/rust/1_46.nix
@@ -15,6 +15,7 @@
 , CoreFoundation, Security
 , llvmPackages
 , pkgsBuildTarget, pkgsBuildBuild
+, makeRustPlatform
 } @ args:
 
 import ./default.nix {
diff --git a/nixpkgs/pkgs/development/compilers/rust/default.nix b/nixpkgs/pkgs/development/compilers/rust/default.nix
index 9545b851815f..22d8d4e02da7 100644
--- a/nixpkgs/pkgs/development/compilers/rust/default.nix
+++ b/nixpkgs/pkgs/development/compilers/rust/default.nix
@@ -12,6 +12,7 @@
 , CoreFoundation, Security
 , llvmPackages
 , pkgsBuildTarget, pkgsBuildBuild
+, makeRustPlatform
 }: rec {
   toRustTarget = platform: with platform.parsed; let
     cpu_ = {
@@ -22,24 +23,6 @@
   in platform.rustc.config
     or "${cpu_}-${vendor.name}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
 
-  makeRustPlatform = { rustc, cargo, ... }: rec {
-    rust = {
-      inherit rustc cargo;
-    };
-
-    fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetchCargoTarball.nix {
-      inherit cargo;
-    };
-
-    buildRustPackage = callPackage ../../../build-support/rust {
-      inherit rustc cargo fetchCargoTarball;
-    };
-
-    rustcSrc = callPackage ./rust-src.nix {
-      inherit rustc;
-    };
-  };
-
   # This just contains tools for now. But it would conceivably contain
   # libraries too, say if we picked some default/recommended versions from
   # `cratesIO` to build by Hydra and/or try to prefer/bias in Cargo.lock for
diff --git a/nixpkgs/pkgs/development/compilers/rust/make-rust-platform.nix b/nixpkgs/pkgs/development/compilers/rust/make-rust-platform.nix
new file mode 100644
index 000000000000..6a827cff9a15
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/make-rust-platform.nix
@@ -0,0 +1,21 @@
+{ buildPackages, callPackage }:
+
+{ rustc, cargo, ... }:
+
+rec {
+  rust = {
+    inherit rustc cargo;
+  };
+
+  fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetchCargoTarball.nix {
+    inherit cargo;
+  };
+
+  buildRustPackage = callPackage ../../../build-support/rust {
+    inherit rustc cargo fetchCargoTarball;
+  };
+
+  rustcSrc = callPackage ./rust-src.nix {
+    inherit rustc;
+  };
+}
diff --git a/nixpkgs/pkgs/top-level/all-packages.nix b/nixpkgs/pkgs/top-level/all-packages.nix
index 387916ab7756..f60db1f55289 100644
--- a/nixpkgs/pkgs/top-level/all-packages.nix
+++ b/nixpkgs/pkgs/top-level/all-packages.nix
@@ -9187,7 +9187,8 @@ in
   rustPackages = rustPackages_1_46;
 
   inherit (rustPackages) cargo clippy rustc rustPlatform;
-  inherit (rust) makeRustPlatform;
+
+  makeRustPlatform = callPackage ../development/compilers/rust/make-rust-platform.nix {};
 
   buildRustCrate = callPackage ../build-support/rust/build-rust-crate { };
   buildRustCrateHelpers = callPackage ../build-support/rust/build-rust-crate/helpers.nix { };