Revert "rustc: propagate libiconv on darwin"

This reverts commit b6fc00b8f4.

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.
This commit is contained in:
Winter 2022-12-15 18:38:33 -05:00
parent 1ffbdda604
commit b1834a461e
3 changed files with 4 additions and 5 deletions

View File

@ -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;

View File

@ -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.

View File

@ -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;