Merge pull request #220212 from cidkidnix/fix-build-rust-create-liconv

buildRustCrate: add libiconv to nativeBuildInputs on darwin
This commit is contained in:
John Ericson 2023-03-08 16:41:50 -05:00 committed by GitHub
commit 82cfa73fbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -276,7 +276,9 @@ crate_: lib.makeOverridable
name = "rust_${crate.crateName}-${crate.version}${lib.optionalString buildTests_ "-test"}";
version = crate.version;
depsBuildBuild = [ pkgsBuildBuild.stdenv.cc ];
nativeBuildInputs = [ rust stdenv.cc cargo jq ] ++ (crate.nativeBuildInputs or [ ]) ++ nativeBuildInputs_;
nativeBuildInputs = [ rust stdenv.cc cargo jq ]
++ lib.optionals stdenv.buildPlatform.isDarwin [ libiconv ]
++ (crate.nativeBuildInputs or [ ]) ++ nativeBuildInputs_;
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ] ++ (crate.buildInputs or [ ]) ++ buildInputs_;
dependencies = map lib.getLib dependencies_;
buildDependencies = map lib.getLib buildDependencies_;