nixpkgs/pkgs/development/tools/rust/cargo-geiger/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
1.9 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, fetchFromGitHub
, rustPlatform
, pkg-config
, openssl
# darwin dependencies
, Security
, CoreFoundation
, libiconv
, curl
2019-11-06 19:23:32 +00:00
}:
2019-11-02 22:27:34 +00:00
rustPlatform.buildRustPackage rec {
pname = "cargo-geiger";
2023-01-11 06:28:05 +00:00
version = "0.11.5";
2019-11-02 22:27:34 +00:00
src = fetchFromGitHub {
owner = "rust-secure-code";
2019-11-02 22:27:34 +00:00
repo = pname;
rev = "${pname}-${version}";
2023-01-11 06:28:05 +00:00
sha256 = "sha256-PrrhxY+Hk1XfdV0u4GgIsbo8oNOFnqbCeivY2Ix6g+k=";
2019-11-02 22:27:34 +00:00
};
2023-01-11 06:28:05 +00:00
cargoHash = "sha256-D3upXhKFkuZfEVOPJ9mCwoZkbkX9s2MltyTkKcBvb6I=";
buildInputs = [ openssl ]
++ lib.optionals stdenv.isDarwin [ CoreFoundation Security libiconv curl ];
nativeBuildInputs = [ pkg-config ]
# curl-sys wants to run curl-config on darwin
++ lib.optionals stdenv.isDarwin [ curl.dev ];
2019-11-06 19:23:32 +00:00
2022-01-21 22:34:38 +00:00
# skip tests with networking or other failures
checkFlags = [
"--skip serialize_test2_quick_report"
"--skip serialize_test3_quick_report"
"--skip serialize_test6_quick_report"
"--skip serialize_test2_report"
"--skip serialize_test3_report"
"--skip serialize_test6_report"
"--skip test_package::case_2"
"--skip test_package::case_3"
"--skip test_package::case_6"
"--skip test_package_update_readme::case_2"
"--skip test_package_update_readme::case_3"
"--skip test_package_update_readme::case_5"
];
2019-11-02 22:27:34 +00:00
meta = with lib; {
homepage = "https://github.com/rust-secure-code/cargo-geiger";
2022-01-21 22:34:38 +00:00
changelog = "https://github.com/rust-secure-code/cargo-geiger/blob/${pname}-${version}/CHANGELOG.md";
description = "Detects usage of unsafe Rust in a Rust crate and its dependencies";
longDescription = ''
A cargo plugin that detects the usage of unsafe Rust in a Rust crate and
its dependencies. It provides information to aid auditing and guide
dependency selection but it can not help you decide when and why unsafe
code is appropriate.
'';
2019-11-02 22:27:34 +00:00
license = with licenses; [ asl20 /* or */ mit ];
2022-01-21 22:34:38 +00:00
maintainers = with maintainers; [ evanjs jk ];
2019-11-02 22:27:34 +00:00
};
}