mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-30 09:37:59 +03:00
rustc: propagate libiconv on darwin
Rust binaries are unconditionally linked to libiconv on Darwin (see https://github.com/rust-lang/libc/issues/2870). We already add it as a dependency in `buildRustPackage`, so let's go a step further and propagate it.
This commit is contained in:
parent
31ad0a4a09
commit
b6fc00b8f4
@ -127,7 +127,6 @@ 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;
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ lib, stdenv, pkgsHostHost
|
||||
, file, curl, pkg-config, python3, openssl, cmake, zlib
|
||||
, installShellFiles, makeWrapper, cacert, rustPlatform, rustc
|
||||
, CoreFoundation, Security
|
||||
, libiconv, CoreFoundation, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage {
|
||||
@ -25,7 +25,7 @@ rustPlatform.buildRustPackage {
|
||||
(lib.getDev pkgsHostHost.curl)
|
||||
];
|
||||
buildInputs = [ cacert file curl python3 openssl zlib ]
|
||||
++ lib.optionals stdenv.isDarwin [ CoreFoundation Security ];
|
||||
++ lib.optionals stdenv.isDarwin [ libiconv 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.
|
||||
|
@ -148,9 +148,11 @@ in stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
buildInputs = [ openssl ]
|
||||
++ optionals stdenv.isDarwin [ libiconv Security ]
|
||||
++ optionals stdenv.isDarwin [ Security ]
|
||||
++ optional (!withBundledLLVM) llvmShared;
|
||||
|
||||
depsTargetTargetPropagated = optionals stdenv.isDarwin [ libiconv ];
|
||||
|
||||
outputs = [ "out" "man" "doc" ];
|
||||
setOutputFlags = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user