diff options
author | Jonathan Ringer <jonringer117@gmail.com> | 2019-11-06 11:23:32 -0800 |
---|---|---|
committer | Jon <jonringer@users.noreply.github.com> | 2019-11-06 18:07:27 -0800 |
commit | cb581af6d5f34c50022032a223b7362af957e097 (patch) | |
tree | 1797357e502d0645eec92e475aae35f79501c232 /pkgs/development/tools/rust | |
parent | 3780b9e69caae0c5e69836e1e823a111b52264d3 (diff) | |
download | nixlib-cb581af6d5f34c50022032a223b7362af957e097.tar nixlib-cb581af6d5f34c50022032a223b7362af957e097.tar.gz nixlib-cb581af6d5f34c50022032a223b7362af957e097.tar.bz2 nixlib-cb581af6d5f34c50022032a223b7362af957e097.tar.lz nixlib-cb581af6d5f34c50022032a223b7362af957e097.tar.xz nixlib-cb581af6d5f34c50022032a223b7362af957e097.tar.zst nixlib-cb581af6d5f34c50022032a223b7362af957e097.zip |
cargo-geiger: fix darwin build
Diffstat (limited to 'pkgs/development/tools/rust')
-rw-r--r-- | pkgs/development/tools/rust/cargo-geiger/default.nix | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/development/tools/rust/cargo-geiger/default.nix b/pkgs/development/tools/rust/cargo-geiger/default.nix index 2512a9ec4f4b..70601faaf6dc 100644 --- a/pkgs/development/tools/rust/cargo-geiger/default.nix +++ b/pkgs/development/tools/rust/cargo-geiger/default.nix @@ -1,6 +1,8 @@ { stdenv, lib, fetchFromGitHub -, rustPlatform, pkgconfig -, openssl, Security }: +, rustPlatform, pkgconfig, openssl +# darwin dependencies +, Security, CoreFoundation, libiconv +}: rustPlatform.buildRustPackage rec { pname = "cargo-geiger"; @@ -26,9 +28,16 @@ rustPlatform.buildRustPackage rec { --skip test_package::case_6 ''; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security libiconv ]; nativeBuildInputs = [ pkgconfig ]; + # 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. + preConfigure = stdenv.lib.optionalString stdenv.isDarwin '' + export NIX_CFLAGS_COMPILE="-F${CoreFoundation}/Library/Frameworks $NIX_CFLAGS_COMPILE" + ''; + meta = with lib; { description = "Detects usage of unsafe Rust in a Rust crate and its dependencies."; homepage = https://github.com/anderejd/cargo-geiger; |