diff --git a/pkgs/by-name/ta/taskwarrior3/package.nix b/pkgs/by-name/ta/taskwarrior3/package.nix index e9b1c4959185..277c54025681 100644 --- a/pkgs/by-name/ta/taskwarrior3/package.nix +++ b/pkgs/by-name/ta/taskwarrior3/package.nix @@ -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;