dooit: add version test

This commit is contained in:
Austin Horstman 2023-09-16 15:47:52 -05:00
parent 7254eeb1c9
commit c8c3149982
No known key found for this signature in database

View file

@ -1,6 +1,8 @@
{ lib { lib
, fetchFromGitHub , fetchFromGitHub
, dooit
, python3 , python3
, testers
}: }:
python3.pkgs.buildPythonApplication rec { python3.pkgs.buildPythonApplication rec {
@ -10,7 +12,7 @@ python3.pkgs.buildPythonApplication rec {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "kraanzu"; owner = "kraanzu";
repo = pname; repo = "dooit";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-iQAGD6zrBBd4fJONaB7to1OJpAJUO0zeA1xhVQZBkMc="; hash = "sha256-iQAGD6zrBBd4fJONaB7to1OJpAJUO0zeA1xhVQZBkMc=";
}; };
@ -28,9 +30,20 @@ python3.pkgs.buildPythonApplication rec {
tzlocal tzlocal
]; ];
# NOTE pyproject version was bumped after release tag 2.0.1 - remove after next release.
postPatch = ''
substituteInPlace pyproject.toml \
--replace "version = \"2.0.0\"" "version = \"2.0.1\""
'';
# No tests available # No tests available
doCheck = false; doCheck = false;
passthru.tests.version = testers.testVersion {
package = dooit;
command = "HOME=$(mktemp -d) dooit --version";
};
meta = with lib; { meta = with lib; {
description = "A TUI todo manager"; description = "A TUI todo manager";
homepage = "https://github.com/kraanzu/dooit"; homepage = "https://github.com/kraanzu/dooit";