Skip to content

Commit b1834a4

Browse files
committed
Revert "rustc: propagate libiconv on darwin"
This reverts commit b6fc00b. 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.
1 parent 1ffbdda commit b1834a4

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

pkgs/build-support/rust/build-rust-package/default.nix

+1
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ stdenv.mkDerivation ((removeAttrs args [ "depsExtraArgs" "cargoUpdateHook" "carg
134134
];
135135

136136
buildInputs = buildInputs
137+
++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]
137138
++ lib.optionals stdenv.hostPlatform.isMinGW [ windows.pthreads ];
138139

139140
patches = cargoPatches ++ patches;

pkgs/development/compilers/rust/cargo.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{ lib, stdenv, pkgsHostHost
22
, file, curl, pkg-config, python3, openssl, cmake, zlib
33
, installShellFiles, makeWrapper, cacert, rustPlatform, rustc
4-
, libiconv, CoreFoundation, Security
4+
, CoreFoundation, Security
55
, auditable ? false # TODO: change to true when this is the default
66
}:
77

@@ -28,7 +28,7 @@ rustPlatform.buildRustPackage {
2828
(lib.getDev pkgsHostHost.curl)
2929
];
3030
buildInputs = [ cacert file curl python3 openssl zlib ]
31-
++ lib.optionals stdenv.isDarwin [ libiconv CoreFoundation Security ];
31+
++ lib.optionals stdenv.isDarwin [ CoreFoundation Security ];
3232

3333
# cargo uses git-rs which is made for a version of libgit2 from recent master that
3434
# is not compatible with the current version in nixpkgs.

pkgs/development/compilers/rust/rustc.nix

+1-3
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,9 @@ in stdenv.mkDerivation rec {
163163
];
164164

165165
buildInputs = [ openssl ]
166-
++ optionals stdenv.isDarwin [ Security ]
166+
++ optionals stdenv.isDarwin [ libiconv Security ]
167167
++ optional (!withBundledLLVM) llvmShared;
168168

169-
depsTargetTargetPropagated = optionals stdenv.isDarwin [ libiconv ];
170-
171169
outputs = [ "out" "man" "doc" ];
172170
setOutputFlags = false;
173171

0 commit comments

Comments
 (0)