cargo-tarpaulin: use finalAttrs

This commit is contained in:
Petr Portnov
2025-12-04 18:31:36 +03:00
parent f0b8c3e302
commit 3d5bc7bc18
+12 -7
View File
@@ -6,16 +6,17 @@
openssl,
stdenv,
curl,
versionCheckHook,
}:
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "cargo-tarpaulin";
version = "0.34.1";
src = fetchFromGitHub {
owner = "xd009642";
repo = "tarpaulin";
tag = version;
tag = finalAttrs.version;
hash = "sha256-HJgcFQrHINm4BPfZ4c5ZHQYBTSBVYdSl/n0qBlSsNOI=";
};
@@ -33,18 +34,22 @@ rustPlatform.buildRustPackage rec {
doCheck = false;
meta = with lib; {
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
description = "Code coverage tool for Rust projects";
mainProgram = "cargo-tarpaulin";
homepage = "https://github.com/xd009642/tarpaulin";
changelog = "https://github.com/xd009642/tarpaulin/blob/${src.rev}/CHANGELOG.md";
license = with licenses; [
changelog = "https://github.com/xd009642/tarpaulin/blob/${finalAttrs.version}/CHANGELOG.md";
license = with lib.licenses; [
mit # or
asl20
];
maintainers = with maintainers; [
maintainers = with lib.maintainers; [
hugoreeves
progrm_jarvis
];
};
}
})