···1-# New rust versions should first go to staging.
2-# Things to check after updating:
3-# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin:
4-# i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github
5-# This testing can be also done by other volunteers as part of the pull
6-# request review, in case platforms cannot be covered.
7-# 2. The LLVM version used for building should match with rust upstream.
8-# Check the version number in the src/llvm-project git submodule in:
9-# https://github.com/rust-lang/rust/blob/<version-tag>/.gitmodules
10-# 3. Firefox and Thunderbird should still build on x86_64-linux.
11-12-{ stdenv, lib
13-, buildPackages
14-, newScope, callPackage
15-, CoreFoundation, Security, SystemConfiguration
16-, pkgsBuildTarget, pkgsBuildBuild, pkgsBuildHost
17-, makeRustPlatform
18-, llvmPackages_16, llvm_16
19-} @ args:
20-21-import ./default.nix {
22- rustcVersion = "1.70.0";
23- rustcSha256 = "sha256-sr+uAAt6UEDk7Eu8UKCfIVSBkMt1cLDtdzWDaEE70nw=";
24-25- llvmSharedForBuild = pkgsBuildBuild.llvmPackages_16.libllvm.override { enableSharedLibraries = true; };
26- llvmSharedForHost = pkgsBuildHost.llvmPackages_16.libllvm.override { enableSharedLibraries = true; };
27- llvmSharedForTarget = pkgsBuildTarget.llvmPackages_16.libllvm.override { enableSharedLibraries = true; };
28-29- # For use at runtime
30- llvmShared = llvm_16.override { enableSharedLibraries = true; };
31-32- # Expose llvmPackages used for rustc from rustc via passthru for LTO in Firefox
33- llvmPackages = llvmPackages_16;
34-35- # Note: the version MUST be one version prior to the version we're
36- # building
37- bootstrapVersion = "1.69.0";
38-39- # fetch hashes by running `print-hashes.sh ${bootstrapVersion}`
40- bootstrapHashes = {
41- i686-unknown-linux-gnu = "08b2b4f58c0861f40ae159c39cc12f6d41b6858e04a43c6c0aeb36707e2971d0";
42- x86_64-unknown-linux-gnu = "2ca4a306047c0b8b4029c382910fcbc895badc29680e0332c9df990fd1c70d4f";
43- x86_64-unknown-linux-musl = "071cb04819b15d8801584a1395b28d0472ce99c0e716296e3c0bb4e6318cf171";
44- arm-unknown-linux-gnueabihf = "64c82735b4e5606af61be0d01317da436a9590b969e503cdbd19e24636e15845";
45- armv7-unknown-linux-gnueabihf = "a509f02d910041c97847e2ccc4ee908c761b7dc5b3c4715922d2b1c573a09675";
46- aarch64-unknown-linux-gnu = "88af5aa7a40c8f1b40416a1f27de8ffbe09c155d933f69d3e109c0ccee92353b";
47- aarch64-unknown-linux-musl = "76aaf3e4fd7b552feb2d70752c43896a960a2a7c940002f58a5c3f03d2b3c862";
48- x86_64-apple-darwin = "9818dab2c3726d63dfbfde12c9273e62e484ef6d6f6e05a6431a3e089c335454";
49- aarch64-apple-darwin = "36228cac303298243fb84235db87a5ecf2af49db28585a82af091caefd598677";
50- powerpc64le-unknown-linux-gnu = "8ef68b77971c079dbe23b54a2cfb52da012873d96399c424bc223635306e9a58";
51- riscv64gc-unknown-linux-gnu = "e1976bf7d0edb7e7789a1ad7ff8086fdb5306a932650fa8182a5d009883fa6c5";
52- mips64el-unknown-linux-gnuabi64 = "c4bf3043451d6122a3845db825cbe35b5ca61a44659a00004f6cca1299ad9d72";
53- };
54-55- selectRustPackage = pkgs: pkgs.rust_1_70;
56-57- rustcPatches = [ ];
58-}
59-60-(builtins.removeAttrs args [ "pkgsBuildTarget" "pkgsBuildBuild" "pkgsBuildHost" "llvmPackages_16" "llvm_16"])
···1+# New rust versions should first go to staging.
2+# Things to check after updating:
3+# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin:
4+# i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github
5+# This testing can be also done by other volunteers as part of the pull
6+# request review, in case platforms cannot be covered.
7+# 2. The LLVM version used for building should match with rust upstream.
8+# Check the version number in the src/llvm-project git submodule in:
9+# https://github.com/rust-lang/rust/blob/<version-tag>/.gitmodules
10+# 3. Firefox and Thunderbird should still build on x86_64-linux.
11+12+{ stdenv, lib
13+, buildPackages
14+, newScope, callPackage
15+, CoreFoundation, Security, SystemConfiguration
16+, pkgsBuildTarget, pkgsBuildBuild, pkgsBuildHost
17+, makeRustPlatform
18+, llvmPackages_16, llvm_16
19+} @ args:
20+21+import ./default.nix {
22+ rustcVersion = "1.71.0";
23+ rustcSha256 = "sha256-pmfkq9xViOv+o1w4HjGdhA/7+NLb+3l3FzBXNkIDTJY=";
24+25+ llvmSharedForBuild = pkgsBuildBuild.llvmPackages_16.libllvm.override { enableSharedLibraries = true; };
26+ llvmSharedForHost = pkgsBuildHost.llvmPackages_16.libllvm.override { enableSharedLibraries = true; };
27+ llvmSharedForTarget = pkgsBuildTarget.llvmPackages_16.libllvm.override { enableSharedLibraries = true; };
28+29+ # For use at runtime
30+ llvmShared = llvm_16.override { enableSharedLibraries = true; };
31+32+ # Expose llvmPackages used for rustc from rustc via passthru for LTO in Firefox
33+ llvmPackages = llvmPackages_16;
34+35+ # Note: the version MUST be one version prior to the version we're
36+ # building
37+ bootstrapVersion = "1.70.0";
38+39+ # fetch hashes by running `print-hashes.sh ${bootstrapVersion}`
40+ bootstrapHashes = {
41+ i686-unknown-linux-gnu = "119dfd4ee3da6c8fc36444dd15a12187e1f9b34ee6792fb75a6a25d09ea7e865";
42+ x86_64-unknown-linux-gnu = "8499c0b034dd881cd9a880c44021632422a28dc23d7a81ca0a97b04652245982";
43+ x86_64-unknown-linux-musl = "d97c2ac1d9f17e754fa6b7d48c28531d16278547e3fa47050a01da037ddb6de3";
44+ arm-unknown-linux-gnueabihf = "ac98b513c31789d0c3201dfe2bbcc81b9437f7e1a15695d09402efec7934c20e";
45+ armv7-unknown-linux-gnueabihf = "23e6029c2a7363b307af539f0c81f4bb9f0ade12b588658343c8a8cfa41526ae";
46+ aarch64-unknown-linux-gnu = "3aa012fc4d9d5f17ca30af41f87e1c2aacdac46b51adc5213e7614797c6fd24c";
47+ aarch64-unknown-linux-musl = "6381de0b55f1741ac322bf1b56701d8aab4e509ff5302043941170f8df34228e";
48+ x86_64-apple-darwin = "e5819fdbfc7f1a4d5d82cb4c3b7662250748450b45a585433bfb75648bc45547";
49+ aarch64-apple-darwin = "75cbc356a06c9b2daf6b9249febda0f0c46df2a427f7cc8467c7edbd44636e53";
50+ powerpc64le-unknown-linux-gnu = "ba8cb5e3078b1bc7c6b27ab53cfa3af14001728db9a047d0bdf29b8f05a4db34";
51+ riscv64gc-unknown-linux-gnu = "5964f78e5fb30506101a929162a42be6260b887660b71592c5f38466753440c3";
52+ mips64el-unknown-linux-gnuabi64 = "de5fd0b249fbb95b9b67928ba08d7ec49f18f0ae25cbe1b0ede3c02390d7b93a";
53+ };
54+55+ selectRustPackage = pkgs: pkgs.rust_1_71;
56+57+ rustcPatches = [ ];
58+}
59+60+(builtins.removeAttrs args [ "pkgsBuildTarget" "pkgsBuildBuild" "pkgsBuildHost" "llvmPackages_16" "llvm_16"])
+1-1
pkgs/development/compilers/rust/binary.nix
···56 # binaries. The lib.rmeta object inside the ar archive should contain an
57 # .rmeta section, but it is removed. Luckily, this doesn't appear to be an
58 # issue for Rust builds produced by Nix.
59- dontStrip = stdenv.isDarwin;
6061 setupHooks = ./setup-hook.sh;
62 };
···56 # binaries. The lib.rmeta object inside the ar archive should contain an
57 # .rmeta section, but it is removed. Luckily, this doesn't appear to be an
58 # issue for Rust builds produced by Nix.
59+ dontStrip = true;
6061 setupHooks = ./setup-hook.sh;
62 };
+1-4
pkgs/development/compilers/rust/rustc.nix
···75 "--release-channel=stable"
76 "--set=build.rustc=${rustc}/bin/rustc"
77 "--set=build.cargo=${cargo}/bin/cargo"
078 "--enable-rpath"
79 "--enable-vendor"
80 "--build=${rust.toRustTargetSpec stdenv.buildPlatform}"
···148 patchShebangs src/etc
149150 ${optionalString (!withBundledLLVM) "rm -rf src/llvm"}
151-152- # Fix the configure script to not require curl as we won't use it
153- sed -i configure \
154- -e '/probe_need CFG_CURL curl/d'
155156 # Useful debugging parameter
157 # export VERBOSE=1