Merge master into staging-next
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
, CoreFoundation, Security
|
||||
, llvmPackages
|
||||
, pkgsBuildTarget, pkgsBuildBuild
|
||||
, makeRustPlatform
|
||||
} @ args:
|
||||
|
||||
import ./default.nix {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
, CoreFoundation, Security
|
||||
, llvmPackages
|
||||
, pkgsBuildTarget, pkgsBuildBuild
|
||||
, makeRustPlatform
|
||||
} @ args:
|
||||
|
||||
import ./default.nix {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
, CoreFoundation, Security
|
||||
, llvmPackages
|
||||
, pkgsBuildTarget, pkgsBuildBuild
|
||||
, makeRustPlatform
|
||||
}: rec {
|
||||
# https://doc.rust-lang.org/reference/conditional-compilation.html#target_arch
|
||||
toTargetArch = platform:
|
||||
@@ -33,24 +34,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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user