2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, libgit2
|
|
|
|
, openssl
|
|
|
|
, stdenv
|
2022-12-28 21:21:41 +00:00
|
|
|
, darwin
|
2022-09-09 14:08:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-semver-checks";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.17.1";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "obi1kenobi";
|
2022-12-28 21:21:41 +00:00
|
|
|
repo = pname;
|
2022-09-09 14:08:57 +00:00
|
|
|
rev = "v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-zObflf9BKq24km54LW7It4Lvff0OKYNDb02uatdX7g4=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
cargoSha256 = "sha256-itL6WpM4OLn4mzdB0ytM2J7F1fRDrXwCaI/8WdLo6y0=";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [ libgit2 openssl ] ++ lib.optionals stdenv.isDarwin [
|
2022-12-28 21:21:41 +00:00
|
|
|
darwin.apple_sdk.frameworks.Security
|
2022-09-09 14:08:57 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkFlags = [
|
|
|
|
# requires nightly version of cargo-rustdoc
|
2022-12-28 21:21:41 +00:00
|
|
|
"--skip=dump::tests"
|
2022-09-30 11:47:45 +00:00
|
|
|
"--skip=query::tests"
|
2023-01-11 07:51:40 +00:00
|
|
|
"--skip=verify_binary_contains_lints"
|
2022-09-09 14:08:57 +00:00
|
|
|
];
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
# use system openssl
|
|
|
|
OPENSSL_NO_VENDOR = true;
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A tool to scan your Rust crate for semver violations";
|
2022-12-28 21:21:41 +00:00
|
|
|
homepage = "https://github.com/obi1kenobi/cargo-semver-checks";
|
|
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
2022-09-30 11:47:45 +00:00
|
|
|
maintainers = with maintainers; [ figsoda matthiasbeyer ];
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
}
|