cargo-geiger: fix darwin build
This commit is contained in:
parent
3780b9e69c
commit
cb581af6d5
@ -1,6 +1,8 @@
|
|||||||
{ stdenv, lib, fetchFromGitHub
|
{ stdenv, lib, fetchFromGitHub
|
||||||
, rustPlatform, pkgconfig
|
, rustPlatform, pkgconfig, openssl
|
||||||
, openssl, Security }:
|
# darwin dependencies
|
||||||
|
, Security, CoreFoundation, libiconv
|
||||||
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "cargo-geiger";
|
pname = "cargo-geiger";
|
||||||
@ -26,9 +28,16 @@ rustPlatform.buildRustPackage rec {
|
|||||||
--skip test_package::case_6
|
--skip test_package::case_6
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security libiconv ];
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
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; {
|
meta = with lib; {
|
||||||
description = "Detects usage of unsafe Rust in a Rust crate and its dependencies.";
|
description = "Detects usage of unsafe Rust in a Rust crate and its dependencies.";
|
||||||
homepage = https://github.com/anderejd/cargo-geiger;
|
homepage = https://github.com/anderejd/cargo-geiger;
|
||||||
|
@ -8534,7 +8534,8 @@ in
|
|||||||
cargo-expand = callPackage ../development/tools/rust/cargo-expand { };
|
cargo-expand = callPackage ../development/tools/rust/cargo-expand { };
|
||||||
cargo-fuzz = callPackage ../development/tools/rust/cargo-fuzz { };
|
cargo-fuzz = callPackage ../development/tools/rust/cargo-fuzz { };
|
||||||
cargo-geiger = callPackage ../development/tools/rust/cargo-geiger {
|
cargo-geiger = callPackage ../development/tools/rust/cargo-geiger {
|
||||||
inherit (darwin.apple_sdk.frameworks) Security;
|
inherit (darwin) libiconv;
|
||||||
|
inherit (darwin.apple_sdk.frameworks) Security CoreFoundation;
|
||||||
};
|
};
|
||||||
cargo-inspect = callPackage ../development/tools/rust/cargo-inspect {
|
cargo-inspect = callPackage ../development/tools/rust/cargo-inspect {
|
||||||
inherit (darwin.apple_sdk.frameworks) Security;
|
inherit (darwin.apple_sdk.frameworks) Security;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user