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-22 10:55:15 +00:00
|
|
|
version = "0.18.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-22 10:55:15 +00:00
|
|
|
sha256 = "sha256-nxQ060M5TEUMKtJZ1j3A3v3s1cW1mnHy0/2ZXbxoaMc=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
cargoSha256 = "sha256-D/rY9d50uKkheEeHe6S04TSdmTyUVgrABIYrFOuZudY=";
|
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-09-30 11:47:45 +00:00
|
|
|
"--skip=query::tests"
|
2023-01-11 07:51:40 +00:00
|
|
|
"--skip=verify_binary_contains_lints"
|
2023-02-16 17:41:37 +00:00
|
|
|
"--skip=rustdoc_cmd::tests"
|
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
|
|
|
};
|
|
|
|
}
|