eaf6957cd3
GitOrigin-RevId: 4bb072f0a8b267613c127684e099a70e1f6ff106
66 lines
1.5 KiB
Nix
66 lines
1.5 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, libgit2
|
|
, openssl
|
|
, zlib
|
|
, stdenv
|
|
, darwin
|
|
, git
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "cargo-semver-checks";
|
|
version = "0.19.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "obi1kenobi";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-tZ83Lxo7yKpFQrD1rnm/3YaT3MgiVb/jL2OVdt491xg=";
|
|
};
|
|
|
|
cargoSha256 = "sha256-k0dc/bOkIcLP++ZH+rh01do5kcVDh/8hNGM3MPhg/0g=";
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [
|
|
libgit2
|
|
openssl
|
|
zlib
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
darwin.apple_sdk.frameworks.Security
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
git
|
|
];
|
|
|
|
checkFlags = [
|
|
# requires nightly version of cargo-rustdoc
|
|
"--skip=both_passing_manifest_path_and_directory_works"
|
|
"--skip=rustdoc_cmd::tests"
|
|
"--skip=verify_binary_contains_lints"
|
|
|
|
# requires internet access
|
|
"--skip=detects_target_dependencies"
|
|
];
|
|
|
|
preCheck = ''
|
|
patchShebangs scripts/regenerate_test_rustdocs.sh
|
|
git init
|
|
scripts/regenerate_test_rustdocs.sh
|
|
'';
|
|
|
|
# use system openssl
|
|
OPENSSL_NO_VENDOR = true;
|
|
|
|
meta = with lib; {
|
|
description = "A tool to scan your Rust crate for semver violations";
|
|
homepage = "https://github.com/obi1kenobi/cargo-semver-checks";
|
|
changelog = "https://github.com/obi1kenobi/cargo-semver-checks/releases/tag/v${version}";
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
|
maintainers = with maintainers; [ figsoda matthiasbeyer ];
|
|
};
|
|
}
|