Skip to content

Commit

Permalink
rustPlatform.buildRustPackage: do not add libiconv to buildInputs
Browse files Browse the repository at this point in the history
Many buildRustPackage-based derivations require libiconv as a build
input on Darwin. This is caused by `libc` unconditionally linking
against libiconv. However, this was recently changed:

rust-lang/libc#2150

We will probably see this dependency disappear over the coming months
once a new `libc` crate version is released and other crates adopt
this new version.

Since this is already an optional dependency and it will disappear
in the coming time, we should probably not unconditionally add it
to all Rust crates.
  • Loading branch information
danieldk committed May 8, 2021
1 parent 252bf94 commit 5e8af9a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions pkgs/build-support/rust/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
, git
, rust
, rustc
, libiconv
, windows
}:

Expand Down Expand Up @@ -119,7 +118,6 @@ stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // lib.optionalAttrs u
];

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

patches = cargoPatches ++ patches;
Expand Down

0 comments on commit 5e8af9a

Please sign in to comment.