taskwarrior3: fix version and add versionCheckHook test (#368520)

This commit is contained in:
Doron Behar
2024-12-28 19:17:44 +02:00
committed by GitHub
+14 -3
View File
@@ -19,6 +19,9 @@
# nativeCheckInputs
python3,
# nativeInstallCheckInputs
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "taskwarrior";
@@ -26,8 +29,8 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchFromGitHub {
owner = "GothenburgBitFactory";
repo = "taskwarrior";
rev = "dcbe916286792e6f5d2d3af3baab79918ebc5f71";
hash = "sha256-jma1BYZugMH+JiX5Xu6VI8ZFn4FBr1NxbNrOHX0bFk0=";
rev = "v${finalAttrs.version}";
hash = "sha256-aKDwRCJ1yopRdsPxnHhgOpSho1i8/dcAurI+XhpSbn4=";
fetchSubmodules = true;
};
cargoDeps = rustPlatform.fetchCargoTarball {
@@ -90,6 +93,14 @@ stdenv.mkDerivation (finalAttrs: {
python3
];
doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.meta.mainProgram}";
postInstall = ''
# ZSH is installed automatically from some reason, only bash and fish need
# manual installation
@@ -108,7 +119,7 @@ stdenv.mkDerivation (finalAttrs: {
passthru.tests.nixos = nixosTests.taskchampion-sync-server;
meta = {
changelog = "https://github.com/GothenburgBitFactory/taskwarrior/blob/${finalAttrs.src.rev}/ChangeLog";
changelog = "https://github.com/GothenburgBitFactory/taskwarrior/releases/tag/v${finalAttrs.src.rev}";
description = "Highly flexible command-line tool to manage TODO lists";
homepage = "https://taskwarrior.org";
license = lib.licenses.mit;