Merge pull request #172226 from 06kellyjac/cargo-geiger

main
Ben Siraphob 2 years ago committed by GitHub
commit eb935d1294
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 29
      pkgs/development/tools/rust/cargo-geiger/default.nix

@ -1,7 +1,14 @@
{ stdenv, lib, fetchFromGitHub { stdenv
, rustPlatform, pkg-config, openssl , lib
# darwin dependencies , fetchFromGitHub
, Security, CoreFoundation, libiconv , rustPlatform
, pkg-config
, openssl
# darwin dependencies
, Security
, CoreFoundation
, libiconv
, curl
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
@ -16,15 +23,11 @@ rustPlatform.buildRustPackage rec {
}; };
cargoSha256 = "sha256-i7xDEzZAN2ubW1Q6MhY+xsb9XiUajNDHLdtDuO5r6jA="; cargoSha256 = "sha256-i7xDEzZAN2ubW1Q6MhY+xsb9XiUajNDHLdtDuO5r6jA=";
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security libiconv ]; buildInputs = [ openssl ]
nativeBuildInputs = [ pkg-config ]; ++ lib.optionals stdenv.isDarwin [ CoreFoundation Security libiconv curl ];
nativeBuildInputs = [ pkg-config ]
# FIXME: Use impure version of CoreFoundation because of missing symbols. # curl-sys wants to run curl-config on darwin
# CFURLSetResourcePropertyForKey is defined in the headers but there's no ++ lib.optionals stdenv.isDarwin [ curl.dev ];
# corresponding implementation in the sources from opensource.apple.com.
preConfigure = lib.optionalString stdenv.isDarwin ''
export NIX_CFLAGS_COMPILE="-F${CoreFoundation}/Library/Frameworks $NIX_CFLAGS_COMPILE"
'';
# skip tests with networking or other failures # skip tests with networking or other failures
checkFlags = [ checkFlags = [

Loading…
Cancel
Save