Skip to content

Commit 2bd18f7

Browse files
pter: init at 3.20.1
1 parent 74fe375 commit 2bd18f7

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

pkgs/by-name/pt/pter/package.nix

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
lib,
3+
stdenv,
4+
fetchFromGitea,
5+
python311Packages,
6+
python3Packages,
7+
qt5,
8+
withQt ? false,
9+
}:
10+
let
11+
# Use python311Packages on Darwin due to ncurses being disabled in newer versions
12+
pythonPkgs = if stdenv.isDarwin then python311Packages else python3Packages;
13+
in
14+
pythonPkgs.buildPythonApplication rec {
15+
pname = "pter";
16+
version = "3.20.1";
17+
pyproject = true;
18+
19+
src = fetchFromGitea {
20+
domain = "codeberg.org";
21+
owner = "vonshednob";
22+
repo = "pter";
23+
tag = "v${version}";
24+
hash = "sha256-1TJ3MembAMB3sewlZE0G8vI8HFrSjEIdIKq5J51P40g=";
25+
};
26+
27+
build-system = with pythonPkgs; [
28+
docutils
29+
setuptools
30+
];
31+
32+
nativeBuildInputs = lib.optionals withQt [ qt5.wrapQtAppsHook ];
33+
34+
dependencies =
35+
with pythonPkgs;
36+
[
37+
cursedspace
38+
pytodotxt
39+
]
40+
++ lib.optionals withQt [ pyqt5 ];
41+
42+
nativeCheckInputs = [ pythonPkgs.unittestCheckHook ];
43+
44+
unittestFlagsArray = [
45+
"-s"
46+
"tests"
47+
];
48+
49+
dontWrapQtApps = true;
50+
51+
preFixup = lib.optionalString withQt ''
52+
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
53+
'';
54+
55+
meta = {
56+
description = "Manage your todo.txt in a commandline user interface";
57+
homepage = "https://vonshednob.cc/pter/";
58+
license = lib.licenses.mit;
59+
mainProgram = if withQt then "qpter" else "pter";
60+
maintainers = [ lib.maintainers.amadejkastelic ];
61+
};
62+
}

0 commit comments

Comments
 (0)