Skip to content

Commit

Permalink
cargo-semver-checks: 0.34.0 -> 0.38.0 and refactor (#368838)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasbeyer authored Dec 29, 2024
2 parents cffcff2 + ce0e60c commit bc40545
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions pkgs/by-name/ca/cargo-semver-checks/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@
zlib,
stdenv,
darwin,
git,
testers,
cargo-semver-checks,
nix-update-script,
}:

rustPlatform.buildRustPackage rec {
pname = "cargo-semver-checks";
version = "0.34.0";
version = "0.38.0";

src = fetchFromGitHub {
owner = "obi1kenobi";
repo = pname;
rev = "v${version}";
hash = "sha256-U7ykTLEuREe2GTVswcAw3R3h4zbkWxuI2dt/2689xSA=";
tag = "v${version}";
hash = "sha256-IcKjiKFvkFvu8+LFCAmm39AGUaUdK8zhtNzzSb8VPE0=";
};

cargoHash = "sha256-NoxYHwY5XpRiqrOjQsaSWQCXFalNAS9SchaKwHbB2uU=";
cargoHash = "sha256-QfJ7QnGKmbrGDwYtVyAJNNGoAukD97/tmCwAROvWBIg=";

nativeBuildInputs = [
cmake
Expand All @@ -37,27 +39,37 @@ rustPlatform.buildRustPackage rec {
checkFlags = [
# requires internet access
"--skip=detects_target_dependencies"
"--skip=query::tests_lints::feature_missing"
];

preCheck = ''
# requires internet access
rm -r test_crates/feature_missing
patchShebangs scripts/regenerate_test_rustdocs.sh
substituteInPlace scripts/regenerate_test_rustdocs.sh \
--replace-fail \
'TOPLEVEL="$(git rev-parse --show-toplevel)"' \
"TOPLEVEL=$PWD"
scripts/regenerate_test_rustdocs.sh
substituteInPlace test_outputs/integration_snapshots__bugreport.snap \
--replace-fail \
'cargo-semver-checks [VERSION] ([HASH])' \
'cargo-semver-checks ${version}'
'';

meta = with lib; {
passthru = {
tests.version = testers.testVersion { package = cargo-semver-checks; };
updateScript = nix-update-script { };
};

meta = {
description = "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; [
license = with lib.licenses; [
mit # or
asl20
];
maintainers = with maintainers; [
maintainers = with lib.maintainers; [
figsoda
matthiasbeyer
];
Expand Down

0 comments on commit bc40545

Please sign in to comment.