Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3780b9e69caa
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cb581af6d5f3
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Nov 7, 2019

  1. cargo-geiger: fix darwin build

    Jonathan Ringer committed Nov 7, 2019
    Copy the full SHA
    cb581af View commit details
Showing with 14 additions and 4 deletions.
  1. +12 −3 pkgs/development/tools/rust/cargo-geiger/default.nix
  2. +2 −1 pkgs/top-level/all-packages.nix
15 changes: 12 additions & 3 deletions pkgs/development/tools/rust/cargo-geiger/default.nix
Original file line number Diff line number Diff line change
@@ -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;
3 changes: 2 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -8534,7 +8534,8 @@ in
cargo-expand = callPackage ../development/tools/rust/cargo-expand { };
cargo-fuzz = callPackage ../development/tools/rust/cargo-fuzz { };
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 {
inherit (darwin.apple_sdk.frameworks) Security;