Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc: propagate libiconv on darwin #190093

Merged
merged 1 commit into from
Sep 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion pkgs/build-support/rust/build-rust-package/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/rust/cargo.nix
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/compilers/rust/rustc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down