Skip to content

Commit

Permalink
cargo: fix darwin build
Browse files Browse the repository at this point in the history
  • Loading branch information
LnL7 committed Oct 23, 2017
1 parent 891c372 commit f1f7296
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkgs/development/compilers/rust/cargo.nix
@@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, file, curl, pkgconfig, python, openssl, cmake, zlib
, makeWrapper, libiconv, cacert, rustPlatform, rustc, libgit2
, makeWrapper, libiconv, cacert, rustPlatform, rustc, libgit2, darwin
, version, srcSha, cargoSha256
, patches ? []}:

Expand All @@ -21,7 +21,10 @@ rustPlatform.buildRustPackage rec {

nativeBuildInputs = [ pkgconfig ];
buildInputs = [ file curl python openssl cmake zlib makeWrapper libgit2 ]
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv ];
# FIXME: Use impure version of CoreFoundation because of missing symbols.
# CFURLSetResourcePropertyForKey is defined in the headers but there's no
# corresponding implementation in the sources from opensource.apple.com.
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation libiconv ];

LIBGIT2_SYS_USE_PKG_CONFIG=1;

Expand Down

0 comments on commit f1f7296

Please sign in to comment.