mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
4550302509
cargo-semver-checks: 0.29.1 -> 0.30.0
62 lines
1.4 KiB
Nix
62 lines
1.4 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, zlib
|
|
, stdenv
|
|
, darwin
|
|
, git
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "cargo-semver-checks";
|
|
version = "0.30.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "obi1kenobi";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-5+UE1Ka2pciuNrkrPDCJMp12+IUbgq7k3cKSP5pahw4=";
|
|
};
|
|
|
|
cargoHash = "sha256-GuajrFdPlgneL95eWT3n2MdzfsbuID/pI9ED8TlVOCo=";
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
];
|
|
|
|
buildInputs = [
|
|
zlib
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
git
|
|
];
|
|
|
|
checkFlags = [
|
|
# requires nightly version of cargo-rustdoc
|
|
"--skip=both_passing_manifest_path_and_directory_works"
|
|
"--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
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A tool to scan your Rust crate for semver violations";
|
|
mainProgram = "cargo-semver-checks";
|
|
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 ];
|
|
};
|
|
}
|