Created
April 19, 2020 12:23
-
-
Save progval/da945eab4ec04f55123411b4063de001 to your computer and use it in GitHub Desktop.
selectLlvm.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pkgs/development/compilers/rust/1_29.nix b/pkgs/development/compilers/rust/1_29.nix | |
index ba76e6555ce..d0a494b03af 100644 | |
--- a/pkgs/development/compilers/rust/1_29.nix | |
+++ b/pkgs/development/compilers/rust/1_29.nix | |
@@ -11,7 +11,7 @@ import ./default.nix { | |
rustcVersion = "1.29.0"; | |
rustcSha256 = "1sb15znckj8pc8q3g7cq03pijnida6cg64yqmgiayxkzskzk9sx4"; | |
- llvm = llvm_7; | |
+ selectLlvm = pkgs: pkgs.llvm_7; | |
# Note: the version MUST be one version prior to the version we're | |
# building | |
diff --git a/pkgs/development/compilers/rust/1_30.nix b/pkgs/development/compilers/rust/1_30.nix | |
index 02c80e4c430..190bd79cb72 100644 | |
--- a/pkgs/development/compilers/rust/1_30.nix | |
+++ b/pkgs/development/compilers/rust/1_30.nix | |
@@ -11,7 +11,7 @@ import ./default.nix { | |
rustcVersion = "1.30.1"; | |
rustcSha256 = "0aavdc1lqv0cjzbqwl5n59yd0bqdlhn0zas61ljf38yrvc18k8rn"; | |
- llvm = llvm_7; | |
+ selectLlvm = pkgs: pkgs.llvm_7; | |
# rustc-dev didn't exist yet | |
enableRustcDev = false; | |
diff --git a/pkgs/development/compilers/rust/1_31.nix b/pkgs/development/compilers/rust/1_31.nix | |
index 50e148ee2c3..e5c99804a52 100644 | |
--- a/pkgs/development/compilers/rust/1_31.nix | |
+++ b/pkgs/development/compilers/rust/1_31.nix | |
@@ -11,7 +11,7 @@ import ./default.nix { | |
rustcVersion = "1.31.1"; | |
rustcSha256 = "01pg2619bwjnhjbphryrbkwaz0lw8cfffm4xlz35znzipb04vmcs"; | |
- llvm = llvm_7; | |
+ selectLlvm = pkgs: pkgs.llvm_7; | |
# rustc-dev didn't exist yet | |
enableRustcDev = false; | |
diff --git a/pkgs/development/compilers/rust/1_32.nix b/pkgs/development/compilers/rust/1_32.nix | |
index 3970656f417..6a9588c6df6 100644 | |
--- a/pkgs/development/compilers/rust/1_32.nix | |
+++ b/pkgs/development/compilers/rust/1_32.nix | |
@@ -11,7 +11,7 @@ import ./default.nix { | |
rustcVersion = "1.32.0"; | |
rustcSha256 = "0ji2l9xv53y27xy72qagggvq47gayr5lcv2jwvmfirx029vlqnac"; | |
- llvm = llvm_7; | |
+ selectLlvm = pkgs: pkgs.llvm_7; | |
# rustc-dev didn't exist yet | |
enableRustcDev = false; | |
diff --git a/pkgs/development/compilers/rust/1_33.nix b/pkgs/development/compilers/rust/1_33.nix | |
index a6160f91f45..5b50a1bd95a 100644 | |
--- a/pkgs/development/compilers/rust/1_33.nix | |
+++ b/pkgs/development/compilers/rust/1_33.nix | |
@@ -11,7 +11,7 @@ import ./default.nix { | |
rustcVersion = "1.33.0"; | |
rustcSha256 = "152x91mg7bz4ygligwjb05fgm1blwy2i70s2j03zc9jiwvbsh0as"; | |
- llvm = llvm_7; | |
+ selectLlvm = pkgs: pkgs.llvm_7; | |
# rustc-dev didn't exist yet | |
enableRustcDev = false; | |
diff --git a/pkgs/development/compilers/rust/1_34.nix b/pkgs/development/compilers/rust/1_34.nix | |
index 4163e2d1933..f0fcd36e4f7 100644 | |
--- a/pkgs/development/compilers/rust/1_34.nix | |
+++ b/pkgs/development/compilers/rust/1_34.nix | |
@@ -11,7 +11,7 @@ import ./default.nix { | |
rustcVersion = "1.34.2"; | |
rustcSha256 = "0mig0prkmlnpbba1cmi17vlsl88ikv5pi26zjy2kcr64l62lm6n6"; | |
- llvm = llvm_8; | |
+ selectLlvm = pkgs: pkgs.llvm_8; | |
# rustc-dev didn't exist yet | |
enableRustcDev = false; | |
diff --git a/pkgs/development/compilers/rust/1_35.nix b/pkgs/development/compilers/rust/1_35.nix | |
index e56c38097ea..baca4ccc859 100644 | |
--- a/pkgs/development/compilers/rust/1_35.nix | |
+++ b/pkgs/development/compilers/rust/1_35.nix | |
@@ -11,7 +11,7 @@ import ./default.nix { | |
rustcVersion = "1.35.0"; | |
rustcSha256 = "0bbizy6b7002v1rdhrxrf5gijclbyizdhkglhp81ib3bf5x66kas"; | |
- llvm = llvm_8; | |
+ selectLlvm = pkgs: pkgs.llvm_8; | |
# rustc-dev didn't exist yet | |
enableRustcDev = false; | |
diff --git a/pkgs/development/compilers/rust/1_36.nix b/pkgs/development/compilers/rust/1_36.nix | |
index beb6b7e12dc..004b3bb5200 100644 | |
--- a/pkgs/development/compilers/rust/1_36.nix | |
+++ b/pkgs/development/compilers/rust/1_36.nix | |
@@ -11,7 +11,7 @@ import ./default.nix { | |
rustcVersion = "1.36.0"; | |
rustcSha256 = "06xv2p6zq03lidr0yaf029ii8wnjjqa894nkmrm6s0rx47by9i04"; | |
- llvm = llvm_8; | |
+ selectLlvm = pkgs: pkgs.llvm_8; | |
# rustc-dev didn't exist yet | |
enableRustcDev = false; | |
diff --git a/pkgs/development/compilers/rust/1_37.nix b/pkgs/development/compilers/rust/1_37.nix | |
index d7051553fee..1ec1c9676d4 100644 | |
--- a/pkgs/development/compilers/rust/1_37.nix | |
+++ b/pkgs/development/compilers/rust/1_37.nix | |
@@ -11,7 +11,7 @@ import ./default.nix { | |
rustcVersion = "1.37.0"; | |
rustcSha256 = "1hrqprybhkhs6d9b5pjskfnc5z9v2l2gync7nb39qjb5s0h703hj"; | |
- llvm = llvm_8; | |
+ selectLlvm = pkgs: pkgs.llvm_8; | |
# rustc-dev didn't exist yet | |
enableRustcDev = false; | |
diff --git a/pkgs/development/compilers/rust/1_38.nix b/pkgs/development/compilers/rust/1_38.nix | |
index c21b627fd0a..b813907d716 100644 | |
--- a/pkgs/development/compilers/rust/1_38.nix | |
+++ b/pkgs/development/compilers/rust/1_38.nix | |
@@ -11,7 +11,7 @@ import ./default.nix { | |
rustcVersion = "1.38.0"; | |
rustcSha256 = "101dlpsfkq67p0hbwx4acqq6n90dj4bbprndizpgh1kigk566hk4"; | |
- llvm = llvm_8; | |
+ selectLlvm = pkgs: pkgs.llvm_8; | |
# rustc-dev didn't exist yet | |
enableRustcDev = false; | |
diff --git a/pkgs/development/compilers/rust/1_39.nix b/pkgs/development/compilers/rust/1_39.nix | |
index 8556491664b..a594728d3ff 100644 | |
--- a/pkgs/development/compilers/rust/1_39.nix | |
+++ b/pkgs/development/compilers/rust/1_39.nix | |
@@ -11,7 +11,7 @@ import ./default.nix { | |
rustcVersion = "1.39.0"; | |
rustcSha256 = "0mwkc1bnil2cfyf6nglpvbn2y0zfbv44zfhsd5qg4c9rm6vgd8dl"; | |
- llvm = llvm_8; | |
+ selectLlvm = pkgs: pkgs.llvm_8; | |
# rustc-dev didn't exist yet | |
enableRustcDev = false; | |
diff --git a/pkgs/development/compilers/rust/1_40.nix b/pkgs/development/compilers/rust/1_40.nix | |
index bec08a536fe..d11dd509e0e 100644 | |
--- a/pkgs/development/compilers/rust/1_40.nix | |
+++ b/pkgs/development/compilers/rust/1_40.nix | |
@@ -11,7 +11,7 @@ import ./default.nix { | |
rustcVersion = "1.40.0"; | |
rustcSha256 = "1ba9llwhqm49w7sz3z0gqscj039m53ky9wxzhaj11z6yg1ah15yx"; | |
- llvm = llvm_8; | |
+ selectLlvm = pkgs: pkgs.llvm_8; | |
enableRustcDev = true; | |
diff --git a/pkgs/development/compilers/rust/1_41.nix b/pkgs/development/compilers/rust/1_41.nix | |
index ef40a403719..e6cb636b03b 100644 | |
--- a/pkgs/development/compilers/rust/1_41.nix | |
+++ b/pkgs/development/compilers/rust/1_41.nix | |
@@ -11,7 +11,7 @@ import ./default.nix { | |
rustcVersion = "1.41.1"; | |
rustcSha256 = "0jypz2mrzac41sj0zh07yd1z36g2s2rvgsb8g624sk4l14n84ijm"; # FIXME | |
- llvm = llvm_8; | |
+ selectLlvm = pkgs: pkgs.llvm_8; | |
enableRustcDev = true; | |
diff --git a/pkgs/development/compilers/rust/1_42.nix b/pkgs/development/compilers/rust/1_42.nix | |
index 48268656d77..c20181507af 100644 | |
--- a/pkgs/development/compilers/rust/1_42.nix | |
+++ b/pkgs/development/compilers/rust/1_42.nix | |
@@ -20,7 +20,7 @@ import ./default.nix { | |
rustcVersion = "1.42.0"; | |
rustcSha256 = "0x9lxs82may6c0iln0b908cxyn1cv7h03n5cmbx3j1bas4qzks6j"; | |
- llvm = llvm_9; | |
+ selectLlvm = pkgs: pkgs.llvm_9; | |
enableRustcDev = true; | |
diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix | |
index 472f3750c38..6bc24929283 100644 | |
--- a/pkgs/development/compilers/rust/default.nix | |
+++ b/pkgs/development/compilers/rust/default.nix | |
@@ -5,7 +5,7 @@ | |
, selectRustPackage | |
, rustcPatches ? [] | |
, rustcPreConfigure ? null | |
-, llvm | |
+, selectLlvm | |
}: | |
{ stdenv, lib | |
, buildPackages | |
@@ -67,7 +67,7 @@ | |
sha256 = rustcSha256; | |
inherit enableRustcDev; | |
- inherit llvm; | |
+ inherit selectLlvm; | |
preConfigure = rustcPreConfigure; | |
patches = rustcPatches; | |
diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix | |
index 1178de7a65d..65886122c29 100644 | |
--- a/pkgs/development/compilers/rust/rustc.nix | |
+++ b/pkgs/development/compilers/rust/rustc.nix | |
@@ -1,6 +1,6 @@ | |
-{ stdenv, removeReferencesTo, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget | |
+{ stdenv, removeReferencesTo, pkgs, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget | |
, fetchurl, file, python3 | |
-, llvm, darwin, cmake, rust, rustPlatform | |
+, selectLlvm, darwin, cmake, rust, rustPlatform | |
, pkgconfig, openssl | |
, which, libffi | |
, withBundledLLVM ? false | |
@@ -15,12 +15,12 @@ let | |
inherit (stdenv.lib) optionals optional optionalString; | |
inherit (darwin.apple_sdk.frameworks) Security; | |
- llvmSharedForBuild = llvm.override { enableSharedLibraries = true; }; | |
- llvmSharedForHost = llvm.override { enableSharedLibraries = true; }; | |
- llvmSharedForTarget = llvm.override { enableSharedLibraries = true; }; | |
+ llvmSharedForBuild = (selectLlvm pkgsBuildBuild).override { enableSharedLibraries = true; }; | |
+ llvmSharedForHost = (selectLlvm pkgsBuildHost).override { enableSharedLibraries = true; }; | |
+ llvmSharedForTarget = (selectLlvm pkgsBuildTarget).override { enableSharedLibraries = true; }; | |
# For use at runtime | |
- llvmShared = llvm.override { enableSharedLibraries = true; }; | |
+ llvmShared = (selectLlvm pkgs).override { enableSharedLibraries = true; }; | |
in stdenv.mkDerivation rec { | |
pname = "rustc"; | |
inherit version; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment