diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-02-22 18:34:05 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-02-22 18:34:05 -0500 |
commit | 0b0e6918331b1e99d2b148e296a9bd0cd0dd5479 (patch) | |
tree | 70df06fcd2651ceda9668822a7844ab5983fb939 /pkgs/development/compilers/rust | |
parent | c1a16501c40894bc82b35443f248db9b82eac873 (diff) | |
download | nixpkgs-0b0e6918331b1e99d2b148e296a9bd0cd0dd5479.tar nixpkgs-0b0e6918331b1e99d2b148e296a9bd0cd0dd5479.tar.gz nixpkgs-0b0e6918331b1e99d2b148e296a9bd0cd0dd5479.tar.bz2 nixpkgs-0b0e6918331b1e99d2b148e296a9bd0cd0dd5479.tar.lz nixpkgs-0b0e6918331b1e99d2b148e296a9bd0cd0dd5479.tar.xz nixpkgs-0b0e6918331b1e99d2b148e296a9bd0cd0dd5479.tar.zst nixpkgs-0b0e6918331b1e99d2b148e296a9bd0cd0dd5479.zip |
rust 1.41: Fix build with no_std only target
See https://github.com/rust-lang/rust/pull/69381
Diffstat (limited to 'pkgs/development/compilers/rust')
-rw-r--r-- | pkgs/development/compilers/rust/1_41_0.nix | 19 | ||||
-rw-r--r-- | pkgs/development/compilers/rust/default.nix | 3 | ||||
-rw-r--r-- | pkgs/development/compilers/rust/rustc.nix | 3 |
3 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/development/compilers/rust/1_41_0.nix b/pkgs/development/compilers/rust/1_41_0.nix index 2762f441171..b73d9b8ef26 100644 --- a/pkgs/development/compilers/rust/1_41_0.nix +++ b/pkgs/development/compilers/rust/1_41_0.nix @@ -6,6 +6,16 @@ # request review, in case platforms cannot be covered. # 2. The LLVM version used for building should match with rust upstream. # 3. Firefox and Thunderbird should still build on x86_64-linux. + +{ stdenv, lib +, buildPackages +, newScope, callPackage +, CoreFoundation, Security +, llvmPackages_5 +, pkgsBuildTarget, pkgsBuildBuild +, fetchpatch +} @ args: + import ./default.nix { rustcVersion = "1.41.0"; rustcSha256 = "0jypz2mrzac41sj0zh07yd1z36g2s2rvgsb8g624sk4l14n84ijm"; @@ -26,4 +36,13 @@ import ./default.nix { }; selectRustPackage = pkgs: pkgs.rust_1_41_0; + + rustcPatches = [ + (fetchpatch { + url = "https://github.com/QuiltOS/rust/commit/f1803452b9e95bfdbc3b8763138b9f92c7d12b46.diff"; + sha256 = "1mzxaj46bq7ll617wg0mqnbnwr1da3hd4pbap8bjwhs3kfqnr7kk"; + }) + ]; } + +(builtins.removeAttrs args [ "fetchpatch" ]) diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix index da3421a987d..22c56eaee94 100644 --- a/pkgs/development/compilers/rust/default.nix +++ b/pkgs/development/compilers/rust/default.nix @@ -4,6 +4,7 @@ , bootstrapVersion , bootstrapHashes , selectRustPackage +, rustcPatches ? [] }: { stdenv, lib , buildPackages @@ -73,6 +74,8 @@ sha256 = rustcSha256; inherit enableRustcDev; + patches = rustcPatches; + # Use boot package set to break cycle rustPlatform = bootRustPlatform; } // lib.optionalAttrs (stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform) { diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index b0c26f3dffd..80a45119bad 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -7,6 +7,7 @@ , enableRustcDev ? true , version , sha256 +, patches ? [] }: let @@ -104,6 +105,8 @@ in stdenv.mkDerivation rec { # the rust build system complains that nix alters the checksums dontFixLibtool = true; + inherit patches; + postPatch = '' patchShebangs src/etc |