summary refs log tree commit diff
path: root/pkgs/tools/misc/dooit/default.nix
blob: ab7db4a2cb7c40eb672e1acd2adaff907a308a7b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ lib
, fetchFromGitHub
, dooit
, python3
, testers
}:

python3.pkgs.buildPythonApplication rec {
  pname = "dooit";
  version = "2.0.1";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "kraanzu";
    repo = "dooit";
    rev = "v${version}";
    hash = "sha256-iQAGD6zrBBd4fJONaB7to1OJpAJUO0zeA1xhVQZBkMc=";
  };

  nativeBuildInputs = with python3.pkgs; [
    poetry-core
  ];

  propagatedBuildInputs = with python3.pkgs; [
    appdirs
    pyperclip
    python-dateutil
    pyyaml
    textual
    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
  doCheck = false;

  passthru.tests.version = testers.testVersion {
    package = dooit;
    command = "HOME=$(mktemp -d) dooit --version";
  };

  meta = with lib; {
    description = "A TUI todo manager";
    homepage = "https://github.com/kraanzu/dooit";
    changelog = "https://github.com/kraanzu/dooit/blob/v${version}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ khaneliman wesleyjrz ];
  };
}