2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-08-20 17:08:02 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, perl
|
|
|
|
, pkg-config
|
2021-09-18 10:52:07 +00:00
|
|
|
, SystemConfiguration
|
2020-08-20 17:08:02 +00:00
|
|
|
, Security
|
2022-08-21 13:32:41 +00:00
|
|
|
, CoreFoundation
|
2020-08-20 17:08:02 +00:00
|
|
|
, curl
|
|
|
|
, libiconv
|
|
|
|
, openssl
|
2021-09-18 10:52:07 +00:00
|
|
|
, git
|
2020-08-20 17:08:02 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-crev";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.25.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "crev-dev";
|
|
|
|
repo = "cargo-crev";
|
2021-12-06 16:07:01 +00:00
|
|
|
rev = "v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
sha256 = "sha256-cXGZhTLIxR9VHrQT+unbl69AviiQ6FCOJTdOP/4fRYI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
cargoHash = "sha256-H/5OZCnshGOUKVaBTbFAiMpYdsNC/96gV+rOgiuwDYc=";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
git config --global user.name "Nixpkgs Test"
|
|
|
|
git config --global user.email "nobody@example.com"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
nativeBuildInputs = [ perl pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ SystemConfiguration Security CoreFoundation libiconv curl ];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ git ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A cryptographically verifiable code review system for the cargo (Rust) package manager";
|
|
|
|
homepage = "https://github.com/crev-dev/cargo-crev";
|
|
|
|
license = with licenses; [ asl20 mit mpl20 ];
|
2023-08-22 20:05:09 +00:00
|
|
|
maintainers = with maintainers; [ b4dm4n matthiasbeyer ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|