From 2c83836078e4f8a0a7317cb833036805f056db61 Mon Sep 17 00:00:00 2001 From: figsoda Date: Tue, 21 Feb 2023 16:16:26 -0500 Subject: [PATCH] cargo-semver-checks: 0.18.1 -> 0.18.2, reenable query tests Diff: https://github.com/obi1kenobi/cargo-semver-checks/compare/v0.18.1...v0.18.2 --- .../rust/cargo-semver-checks/default.nix | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-semver-checks/default.nix b/pkgs/development/tools/rust/cargo-semver-checks/default.nix index 1d59373f30a6..b5f6b4d58801 100644 --- a/pkgs/development/tools/rust/cargo-semver-checks/default.nix +++ b/pkgs/development/tools/rust/cargo-semver-checks/default.nix @@ -4,42 +4,62 @@ , pkg-config , libgit2 , openssl +, zlib , stdenv , darwin +, git }: rustPlatform.buildRustPackage rec { pname = "cargo-semver-checks"; - version = "0.18.1"; + version = "0.18.2"; src = fetchFromGitHub { owner = "obi1kenobi"; repo = pname; rev = "v${version}"; - sha256 = "sha256-nxQ060M5TEUMKtJZ1j3A3v3s1cW1mnHy0/2ZXbxoaMc="; + sha256 = "sha256-ThBpVBt+B6Ltmpw1vWkihFM5JHlEawfu30a1LuOMpPE="; }; - cargoSha256 = "sha256-D/rY9d50uKkheEeHe6S04TSdmTyUVgrABIYrFOuZudY="; + cargoSha256 = "sha256-IuY1GWOygSMTcwWTwb/lvhdGGD+E1NfTtQ86PgTCUAI="; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ libgit2 openssl ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = [ + libgit2 + openssl + zlib + ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + nativeCheckInputs = [ + git + ]; + checkFlags = [ # requires nightly version of cargo-rustdoc - "--skip=query::tests" - "--skip=verify_binary_contains_lints" + "--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 ]; };