cargo-zigbuild: use finalAttrs
This commit is contained in:
@@ -4,16 +4,17 @@
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
zig,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "cargo-zigbuild";
|
||||
version = "0.20.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "messense";
|
||||
repo = "cargo-zigbuild";
|
||||
rev = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-xJiYtVrvWEBsyTbcHKsbnTpbcTryX+ZP/OjD7GP6gQU=";
|
||||
};
|
||||
|
||||
@@ -26,12 +27,16 @@ rustPlatform.buildRustPackage rec {
|
||||
--prefix PATH : ${zig}/bin
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
versionCheckProgramArg = "--version";
|
||||
|
||||
meta = {
|
||||
description = "Tool to compile Cargo projects with zig as the linker";
|
||||
mainProgram = "cargo-zigbuild";
|
||||
homepage = "https://github.com/messense/cargo-zigbuild";
|
||||
changelog = "https://github.com/messense/cargo-zigbuild/releases/tag/v${version}";
|
||||
changelog = "https://github.com/messense/cargo-zigbuild/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.progrm_jarvis ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user