diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-10-01 17:51:46 -0400 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-11-27 13:28:35 +0000 |
commit | 7181b4dddc65a171c747fee348a1c4f3fd05c2af (patch) | |
tree | 60da223413aef7f17b27c2330dac89ee6f710a23 /nixpkgs/pkgs/development | |
parent | ae014a220dac839789833e1825e0ca295e7e93c7 (diff) | |
download | nixlib-7181b4dddc65a171c747fee348a1c4f3fd05c2af.tar nixlib-7181b4dddc65a171c747fee348a1c4f3fd05c2af.tar.gz nixlib-7181b4dddc65a171c747fee348a1c4f3fd05c2af.tar.bz2 nixlib-7181b4dddc65a171c747fee348a1c4f3fd05c2af.tar.lz nixlib-7181b4dddc65a171c747fee348a1c4f3fd05c2af.tar.xz nixlib-7181b4dddc65a171c747fee348a1c4f3fd05c2af.tar.zst nixlib-7181b4dddc65a171c747fee348a1c4f3fd05c2af.zip |
makeRustPlatform: Put back in it's own file.
We expose it on the top level, but I don't think it makes sense to pull it from a specific version of the rust tools when it is in fact version agnostic. This reverts a tiny portion of 912dca193aee9da77a4d429285db53729d81aa3d. (cherry picked from commit 54b4b470c3a7149a7c459d92859a51c2e7a04cf7)
Diffstat (limited to 'nixpkgs/pkgs/development')
5 files changed, 25 insertions, 18 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; + }; +} |