From 1ffbdda604b5c0daf6cbd521aa09b21cdc72f55c Mon Sep 17 00:00:00 2001 From: figsoda Date: Thu, 15 Dec 2022 11:24:06 -0500 Subject: [PATCH 1/3] rustc: 1.65.0 -> 1.66.0 --- .../compilers/rust/{1_65.nix => 1_66.nix} | 32 +++++++++---------- pkgs/top-level/all-packages.nix | 8 ++--- 2 files changed, 20 insertions(+), 20 deletions(-) rename pkgs/development/compilers/rust/{1_65.nix => 1_66.nix} (56%) diff --git a/pkgs/development/compilers/rust/1_65.nix b/pkgs/development/compilers/rust/1_66.nix similarity index 56% rename from pkgs/development/compilers/rust/1_65.nix rename to pkgs/development/compilers/rust/1_66.nix index 5b2397b5de48..ada9054973fa 100644 --- a/pkgs/development/compilers/rust/1_65.nix +++ b/pkgs/development/compilers/rust/1_66.nix @@ -20,8 +20,8 @@ } @ args: import ./default.nix { - rustcVersion = "1.65.0"; - rustcSha256 = "sha256-WCi7Z/Z36r+MOEAgWCsM56+IThyEOJSE9/jQDdgsADg="; + rustcVersion = "1.66.0"; + rustcSha256 = "sha256-OzzT6lqCombnXQs18LVMFgIVdtnreNOEBSF1p3KTWkg="; llvmSharedForBuild = pkgsBuildBuild.llvmPackages_14.libllvm.override { enableSharedLibraries = true; }; llvmSharedForHost = pkgsBuildHost.llvmPackages_14.libllvm.override { enableSharedLibraries = true; }; @@ -37,25 +37,25 @@ import ./default.nix { # Note: the version MUST be one version prior to the version we're # building - bootstrapVersion = "1.64.0"; + bootstrapVersion = "1.65.0"; # fetch hashes by running `print-hashes.sh ${bootstrapVersion}` bootstrapHashes = { - i686-unknown-linux-gnu = "177b4f95c8cdaa34bb29e69950cbfe236e123757078af4792779c43ee3818199"; - x86_64-unknown-linux-gnu = "a893977f238291370ab96726a74b6b9ae854dc75fbf5730954d901a93843bf9b"; - x86_64-unknown-linux-musl = "d5c4293a8fe1b34d857bec4124229c39711f8759aa2f6108c8b6c22a308f96bb"; - arm-unknown-linux-gnueabihf = "0d7c9c746f7b98f1f99e4cf720f9a32b2f5cdf22cb1d9f677b41c1dca62f14f8"; - armv7-unknown-linux-gnueabihf = "0be29740f565ca8835ba260691274585733a7f4130ec872bfa37654a08013828"; - aarch64-unknown-linux-gnu = "7d8860572431bd4ee1b9cd0cd77cf7ff29fdd5b91ed7c92a820f872de6ced558"; - aarch64-unknown-linux-musl = "9e7cfd960fb8ad3e1f51ef667c56032d3d4d9d9f573a06bbcf65a7c7a96ab430"; - x86_64-apple-darwin = "b6003d49fb857ff8dc105a3ccba98b851cd3e7d874005acb92284fd1113adc0d"; - aarch64-apple-darwin = "e1a37dc5991304716e260144311fd291d8fb514042e45c244c582b3454477038"; - powerpc64le-unknown-linux-gnu = "9d4591033eac22093d107991a68fffccea087b26bb54115d46cc544fbf5ef66c"; - riscv64gc-unknown-linux-gnu = "f63981d9c1057cb20cf30871757d42475a1cd0c187b3dcce5fabb0cce0f80c5b"; - mips64el-unknown-linux-gnuabi64 = "47488e4c53cca5c99b5837474a880f6c2368a7fe8368560dd8077bddb94959b5"; + i686-unknown-linux-gnu = "b29869f8e2c7029150a929b2c4e26843f363846ad99253a25be6abcfa8e84f46"; + x86_64-unknown-linux-gnu = "8f754fdd5af783fe9020978c64e414cb45f3ad0a6f44d045219bbf2210ca3cb9"; + x86_64-unknown-linux-musl = "716984def5509a844c2dde1c7be42bfadeb179f751d5c1a30c9c7198c8c089cd"; + arm-unknown-linux-gnueabihf = "e27f835c16bfcb66ad022a17d5c4602899e021e483a432ca4cc2cb4ecd39e938"; + armv7-unknown-linux-gnueabihf = "5376d467a29b32cacb771e0c76dc280bd623852709e7ffd92caabab076d5475f"; + aarch64-unknown-linux-gnu = "f406136010e6a1cdce3fb6573506f00d23858af49dd20a46723c3fa5257b7796"; + aarch64-unknown-linux-musl = "4b701dc3cbac04ebf0e336cff2f4ce5fc1a1984c183226863c9ed911eb00b07e"; + x86_64-apple-darwin = "139087a3937799415fd829e5a88162a69a32c23725a44457f9c96b98e4d64a7c"; + aarch64-apple-darwin = "7ddc335bd10fc32d3039ef36248a5d0c4865db2437c8aad20a2428a6cf41df09"; + powerpc64le-unknown-linux-gnu = "3f1d0d5bb13213348dc65e373f8c412fc0a12ee55abc1c864f7e0300932fc687"; + riscv64gc-unknown-linux-gnu = "aac7067348d218faa452b4bdc735778a51570a310ad645313ec767b5d7c88492"; + mips64el-unknown-linux-gnuabi64 = "d91ed3857c5256720da890f6533684b684e880bf9006dc4e4f4181213a5c4a09"; }; - selectRustPackage = pkgs: pkgs.rust_1_65; + selectRustPackage = pkgs: pkgs.rust_1_66; rustcPatches = [ ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a084bc1815dd..3ba342af198a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15214,11 +15214,11 @@ with pkgs; inherit (darwin) apple_sdk; }; - rust_1_65 = callPackage ../development/compilers/rust/1_65.nix { + rust_1_66 = callPackage ../development/compilers/rust/1_66.nix { inherit (darwin.apple_sdk.frameworks) CoreFoundation Security SystemConfiguration; llvm_14 = llvmPackages_14.libllvm; }; - rust = rust_1_65; + rust = rust_1_66; mrustc = callPackage ../development/compilers/mrustc { }; mrustc-minicargo = callPackage ../development/compilers/mrustc/minicargo.nix { }; @@ -15227,8 +15227,8 @@ with pkgs; openssl = openssl_1_1; }; - rustPackages_1_65 = rust_1_65.packages.stable; - rustPackages = rustPackages_1_65; + rustPackages_1_66 = rust_1_66.packages.stable; + rustPackages = rustPackages_1_66; inherit (rustPackages) cargo clippy rustc rustPlatform; From b1834a461edf7abf4a6fb89db0ed65904a48a01c Mon Sep 17 00:00:00 2001 From: Winter Date: Thu, 15 Dec 2022 18:38:33 -0500 Subject: [PATCH 2/3] Revert "rustc: propagate libiconv on darwin" This reverts commit b6fc00b8f4bc25a72c43320b70082bbee06321db. Rust 1.66.0 contains a fix for libiconv being linked unconditionally on macOS, but this only applies to packages that don't depend on older versions of `libc`. For now, let's go back to including libiconv in `buildInputs` by default for packages that use `buildRustPackage`. As packages bump their `libc` versions, we can eventually stop including it by default, and manually add it where needed. --- pkgs/build-support/rust/build-rust-package/default.nix | 1 + pkgs/development/compilers/rust/cargo.nix | 4 ++-- pkgs/development/compilers/rust/rustc.nix | 4 +--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/build-support/rust/build-rust-package/default.nix b/pkgs/build-support/rust/build-rust-package/default.nix index 20fb41d0aaa7..e7eab34e45d9 100644 --- a/pkgs/build-support/rust/build-rust-package/default.nix +++ b/pkgs/build-support/rust/build-rust-package/default.nix @@ -134,6 +134,7 @@ stdenv.mkDerivation ((removeAttrs args [ "depsExtraArgs" "cargoUpdateHook" "carg ]; buildInputs = buildInputs + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ] ++ lib.optionals stdenv.hostPlatform.isMinGW [ windows.pthreads ]; patches = cargoPatches ++ patches; diff --git a/pkgs/development/compilers/rust/cargo.nix b/pkgs/development/compilers/rust/cargo.nix index 5571918fdc62..291a64f2210c 100644 --- a/pkgs/development/compilers/rust/cargo.nix +++ b/pkgs/development/compilers/rust/cargo.nix @@ -1,7 +1,7 @@ { lib, stdenv, pkgsHostHost , file, curl, pkg-config, python3, openssl, cmake, zlib , installShellFiles, makeWrapper, cacert, rustPlatform, rustc -, libiconv, CoreFoundation, Security +, CoreFoundation, Security , auditable ? false # TODO: change to true when this is the default }: @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage { (lib.getDev pkgsHostHost.curl) ]; buildInputs = [ cacert file curl python3 openssl zlib ] - ++ lib.optionals stdenv.isDarwin [ libiconv CoreFoundation Security ]; + ++ lib.optionals stdenv.isDarwin [ CoreFoundation Security ]; # cargo uses git-rs which is made for a version of libgit2 from recent master that # is not compatible with the current version in nixpkgs. diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index 8288cd5c61e3..06d9de15ab8d 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -163,11 +163,9 @@ in stdenv.mkDerivation rec { ]; buildInputs = [ openssl ] - ++ optionals stdenv.isDarwin [ Security ] + ++ optionals stdenv.isDarwin [ libiconv Security ] ++ optional (!withBundledLLVM) llvmShared; - depsTargetTargetPropagated = optionals stdenv.isDarwin [ libiconv ]; - outputs = [ "out" "man" "doc" ]; setOutputFlags = false; From edfbbaf28258d968de64b364d4a0868a80cdf1c2 Mon Sep 17 00:00:00 2001 From: Winter Date: Thu, 15 Dec 2022 18:49:05 -0500 Subject: [PATCH 3/3] rustc: add note about libiconv dependency --- pkgs/development/compilers/rust/rustc.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index 06d9de15ab8d..43d603923c97 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -163,6 +163,7 @@ in stdenv.mkDerivation rec { ]; buildInputs = [ openssl ] + # TODO: remove libiconv once 1.66 is used to bootstrap ++ optionals stdenv.isDarwin [ libiconv Security ] ++ optional (!withBundledLLVM) llvmShared;