Skip to content

Commit 711b3e5

Browse files
authored
taskwarrior3: fix version and add versionCheckHook test (NixOS#368520)
2 parents 8430af3 + c5f91fe commit 711b3e5

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

pkgs/by-name/ta/taskwarrior3/package.nix

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,18 @@
1919

2020
# nativeCheckInputs
2121
python3,
22+
23+
# nativeInstallCheckInputs
24+
versionCheckHook,
2225
}:
2326
stdenv.mkDerivation (finalAttrs: {
2427
pname = "taskwarrior";
2528
version = "3.3.0";
2629
src = fetchFromGitHub {
2730
owner = "GothenburgBitFactory";
2831
repo = "taskwarrior";
29-
rev = "dcbe916286792e6f5d2d3af3baab79918ebc5f71";
30-
hash = "sha256-jma1BYZugMH+JiX5Xu6VI8ZFn4FBr1NxbNrOHX0bFk0=";
32+
rev = "v${finalAttrs.version}";
33+
hash = "sha256-aKDwRCJ1yopRdsPxnHhgOpSho1i8/dcAurI+XhpSbn4=";
3134
fetchSubmodules = true;
3235
};
3336
cargoDeps = rustPlatform.fetchCargoTarball {
@@ -90,6 +93,14 @@ stdenv.mkDerivation (finalAttrs: {
9093
python3
9194
];
9295

96+
doInstallCheck = true;
97+
98+
nativeInstallCheckInputs = [
99+
versionCheckHook
100+
];
101+
102+
versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.meta.mainProgram}";
103+
93104
postInstall = ''
94105
# ZSH is installed automatically from some reason, only bash and fish need
95106
# manual installation
@@ -108,7 +119,7 @@ stdenv.mkDerivation (finalAttrs: {
108119
passthru.tests.nixos = nixosTests.taskchampion-sync-server;
109120

110121
meta = {
111-
changelog = "https://github.com/GothenburgBitFactory/taskwarrior/blob/${finalAttrs.src.rev}/ChangeLog";
122+
changelog = "https://github.com/GothenburgBitFactory/taskwarrior/releases/tag/v${finalAttrs.src.rev}";
112123
description = "Highly flexible command-line tool to manage TODO lists";
113124
homepage = "https://taskwarrior.org";
114125
license = lib.licenses.mit;

0 commit comments

Comments
 (0)