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";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "0.23.3";
|
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}";
|
2022-08-21 13:32:41 +00:00
|
|
|
sha256 = "sha256-wMF2uF6h06c/vBBXr2IGk/9RsOxnxvffEtIOR+s+iVk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
cargoSha256 = "sha256-UF0bEV77IqGBmqGCqg2cHzom7JDRqlLpoSxbNQsKKiY=";
|
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 ];
|
|
|
|
maintainers = with maintainers; [ b4dm4n ];
|
|
|
|
};
|
|
|
|
}
|