git.iko.soy/typeable/nixpkgs
on master help sign in
cargo-geiger: fix darwin build
commitcb581af6d5f34c50022032a223b7362af957e097 authorJonathan Ringer <jonringer117@gmail.com> dateWed 6 Nov 2019, 11:23 (7 years ago) parent3780b9e
2 files changed+14−4
pkgs/development/tools/rust/cargo-geiger/default.nix+12−3 pkgs/top-level/all-packages.nix+2−1
pkgs/development/tools/rust/cargo-geiger/default.nix+12−3
@@ -1,6 +1,8 @@
11{ stdenv, lib, fetchFromGitHub
2−, rustPlatform, pkgconfig
3−, openssl, Security }:
2+, rustPlatform, pkgconfig, openssl
3+# darwin dependencies
4+, Security, CoreFoundation, libiconv
5+}:
46
57rustPlatform.buildRustPackage rec {
68 pname = "cargo-geiger";
@@ -26,9 +28,16 @@ rustPlatform.buildRustPackage rec {
2628 --skip test_package::case_6
2729 '';
2830
29− buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
31+ buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security libiconv ];
3032 nativeBuildInputs = [ pkgconfig ];
3133
34+ # FIXME: Use impure version of CoreFoundation because of missing symbols.
35+ # CFURLSetResourcePropertyForKey is defined in the headers but there's no
36+ # corresponding implementation in the sources from opensource.apple.com.
37+ preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
38+ export NIX_CFLAGS_COMPILE="-F${CoreFoundation}/Library/Frameworks $NIX_CFLAGS_COMPILE"
39+ '';
40+
3241 meta = with lib; {
3342 description = "Detects usage of unsafe Rust in a Rust crate and its dependencies.";
3443 homepage = https://github.com/anderejd/cargo-geiger;
pkgs/top-level/all-packages.nix+2−1
@@ -8534,7 +8534,8 @@ in
85348534 cargo-expand = callPackage ../development/tools/rust/cargo-expand { };
85358535 cargo-fuzz = callPackage ../development/tools/rust/cargo-fuzz { };
85368536 cargo-geiger = callPackage ../development/tools/rust/cargo-geiger {
8537− inherit (darwin.apple_sdk.frameworks) Security;
8537+ inherit (darwin) libiconv;
8538+ inherit (darwin.apple_sdk.frameworks) Security CoreFoundation;
85388539 };
85398540 cargo-inspect = callPackage ../development/tools/rust/cargo-inspect {
85408541 inherit (darwin.apple_sdk.frameworks) Security;