mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 23:52:33 +00:00
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 912dca193a
.
This commit is contained in:
parent
84d74ae9c9
commit
54b4b470c3
|
@ -13,6 +13,7 @@
|
|||
, CoreFoundation, Security
|
||||
, llvmPackages_5
|
||||
, pkgsBuildTarget, pkgsBuildBuild
|
||||
, makeRustPlatform
|
||||
} @ args:
|
||||
|
||||
import ./default.nix {
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
, CoreFoundation, Security
|
||||
, llvmPackages_5
|
||||
, pkgsBuildTarget, pkgsBuildBuild
|
||||
, makeRustPlatform
|
||||
} @ args:
|
||||
|
||||
import ./default.nix {
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
, CoreFoundation, Security
|
||||
, llvmPackages_5
|
||||
, 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
|
||||
|
|
21
pkgs/development/compilers/rust/make-rust-platform.nix
Normal file
21
pkgs/development/compilers/rust/make-rust-platform.nix
Normal file
|
@ -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;
|
||||
};
|
||||
}
|
|
@ -9659,7 +9659,8 @@ in
|
|||
rustPackages = rustPackages_1_45;
|
||||
|
||||
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 { };
|
||||
|
|
Loading…
Reference in a new issue