nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 dooit,
5 python3,
6 testers,
7 nix-update-script,
8 extraPackages ? [ ],
9}:
10python3.pkgs.buildPythonApplication rec {
11 pname = "dooit";
12 version = "3.3.4";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "dooit-org";
17 repo = "dooit";
18 tag = "v${version}";
19 hash = "sha256-A3l+E9B2fWyNpDzMr8WRiiHD/fIcUzcIwtmur+2Mk0k=";
20 };
21
22 build-system = with python3.pkgs; [ hatchling ];
23
24 pythonRelaxDeps = [
25 "tzlocal"
26 "textual"
27 "sqlalchemy"
28 ];
29
30 propagatedBuildInputs =
31 with python3.pkgs;
32 [
33 pyperclip
34 textual
35 pyyaml
36 python-dateutil
37 sqlalchemy
38 platformdirs
39 tzlocal
40 click
41 ]
42 ++ extraPackages;
43
44 # /homeless-shelter
45 preBuild = ''
46 export HOME=$(mktemp -d)
47 '';
48
49 nativeCheckInputs = with python3.pkgs; [
50 pytestCheckHook
51 faker
52 pytest-asyncio
53 ];
54
55 passthru = {
56 tests.version = testers.testVersion {
57 package = dooit;
58 command = "HOME=$(mktemp -d) dooit --version";
59 };
60
61 updateScript = nix-update-script { };
62 };
63
64 meta = {
65 description = "TUI todo manager";
66 homepage = "https://github.com/dooit-org/dooit";
67 changelog = "https://github.com/dooit-org/dooit/blob/v${version}/CHANGELOG.md";
68 license = lib.licenses.mit;
69 maintainers = with lib.maintainers; [
70 khaneliman
71 wesleyjrz
72 kraanzu
73 ];
74 mainProgram = "dooit";
75 };
76}