diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2019-08-01 09:44:06 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2019-08-01 09:44:06 +0200 |
commit | 4ca8e53e1ddb2f2f1e5520be33654c33481faae0 (patch) | |
tree | 94896f54f338cc97a1e43adf3dcbdff15d5a512c /pkgs/build-support/rust | |
parent | 59ac7e16347e2e841e24d3dd959b9fc5dab5fdc8 (diff) | |
parent | 55e4555b77ff7506579c1d4f5d9b562ca6e853b4 (diff) | |
download | nixpkgs-4ca8e53e1ddb2f2f1e5520be33654c33481faae0.tar nixpkgs-4ca8e53e1ddb2f2f1e5520be33654c33481faae0.tar.gz nixpkgs-4ca8e53e1ddb2f2f1e5520be33654c33481faae0.tar.bz2 nixpkgs-4ca8e53e1ddb2f2f1e5520be33654c33481faae0.tar.lz nixpkgs-4ca8e53e1ddb2f2f1e5520be33654c33481faae0.tar.xz nixpkgs-4ca8e53e1ddb2f2f1e5520be33654c33481faae0.tar.zst nixpkgs-4ca8e53e1ddb2f2f1e5520be33654c33481faae0.zip |
Merge staging-next into staging
Diffstat (limited to 'pkgs/build-support/rust')
-rw-r--r-- | pkgs/build-support/rust/default.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix index 674adf87374..bd18f108e4e 100644 --- a/pkgs/build-support/rust/default.nix +++ b/pkgs/build-support/rust/default.nix @@ -14,6 +14,7 @@ , cargoDepsHook ? "" , cargoBuildFlags ? [] , buildType ? "release" +, meta ? {} , cargoVendorDir ? null , ... } @ args: @@ -45,7 +46,6 @@ let ccForHost="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"; cxxForHost="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++"; releaseDir = "target/${stdenv.hostPlatform.config}/${buildType}"; - in stdenv.mkDerivation (args // { inherit cargoDeps; @@ -101,7 +101,7 @@ in stdenv.mkDerivation (args // { "CC_${stdenv.hostPlatform.config}"="${ccForHost}" \ "CXX_${stdenv.hostPlatform.config}"="${cxxForHost}" \ cargo build \ - --${buildType} \ + ${stdenv.lib.optionalString (buildType == "release") "--release"} \ --target ${stdenv.hostPlatform.config} \ --frozen ${concatStringsSep " " cargoBuildFlags} ) @@ -145,4 +145,9 @@ in stdenv.mkDerivation (args // { ''; passthru = { inherit cargoDeps; } // (args.passthru or {}); + + meta = { + # default to Rust's platforms + platforms = rustc.meta.platforms; + } // meta; }) |