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";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "0.14.0";
|
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}";
|
2022-12-28 21:21:41 +00:00
|
|
|
sha256 = "sha256-upGVWCK3gEPH6BZ7W410AnQPIWOCeD4sawQqPLRowfw=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
cargoSha256 = "sha256-PYZe7OO/cevictnWGc+NHVpJXctU2XyejF8jPjSNp3M=";
|
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"
|
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
|
|
|
};
|
|
|
|
}
|