2022-07-18 16:21:45 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchCrate
|
|
|
|
, pkg-config
|
2023-07-15 17:15:38 +00:00
|
|
|
, curl
|
2022-07-18 16:21:45 +00:00
|
|
|
, openssl
|
|
|
|
, stdenv
|
2023-01-11 07:51:40 +00:00
|
|
|
, darwin
|
2022-07-18 16:21:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-public-api";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.32.0";
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-etEwMmfwyOTHRb/UfkcHvmnLVVqeSagWJ5HjuJ6gZVo=";
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
cargoHash = "sha256-7GyPjEit3FEjnegLnZt9TMLBI3BtzcDssrJPj60gpTo=";
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildInputs = [ curl openssl ]
|
2023-01-11 07:51:40 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
# Tests fail
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "List and diff the public API of Rust library crates between releases and commits. Detect breaking API changes and semver violations";
|
|
|
|
homepage = "https://github.com/Enselic/cargo-public-api";
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/Enselic/cargo-public-api/releases/tag/v${version}";
|
2022-07-18 16:21:45 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ matthiasbeyer ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|