tpnotes: switch to finalAttrs (#430834)
This commit is contained in:
@@ -7,17 +7,18 @@
|
||||
oniguruma,
|
||||
installShellFiles,
|
||||
tpnote,
|
||||
testers,
|
||||
versionCheckHook,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "tpnote";
|
||||
version = "1.25.14";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "getreu";
|
||||
repo = "tp-note";
|
||||
tag = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-CgC4aLg1GdqDXzuWfV4i5C4//I3GJ2RJa0y3oFOM0II=";
|
||||
};
|
||||
|
||||
@@ -39,19 +40,27 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
RUSTONIG_SYSTEM_LIBONIG = true;
|
||||
|
||||
passthru.tests.version = testers.testVersion { package = tpnote; };
|
||||
|
||||
# The `tpnote` crate has no unit tests. All tests are in `tpnote-lib`.
|
||||
checkType = "debug";
|
||||
cargoTestFlags = "--package tpnote-lib";
|
||||
doCheck = true;
|
||||
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
];
|
||||
versionCheckProgramArg = "--version";
|
||||
doInstallCheck = true;
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/getreu/tp-note/releases/tag/v${version}";
|
||||
changelog = "https://github.com/getreu/tp-note/releases/tag/v${finalAttrs.version}";
|
||||
description = "Markup enhanced granular note-taking";
|
||||
homepage = "https://blog.getreu.net/projects/tp-note/";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "tpnote";
|
||||
maintainers = with lib.maintainers; [ getreu ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user