Unverified Commit b6fb0591 authored by Artturi's avatar Artturi Committed by GitHub
Browse files

Merge pull request #255047 from khaneliman/dooit

parents b2e0cc82 c8c31499
Loading
Loading
Loading
Loading
+20 −14
Original line number Diff line number Diff line
{ lib
, fetchFromGitHub
, dooit
, python3
, testers
}:

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

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

  # Required versions not available
  pythonRelaxDeps = [
    "textual"
    "tzlocal"
  ];

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

  propagatedBuildInputs = with python3.pkgs; [
    textual
    appdirs
    pyperclip
    python-dateutil
    pyyaml
    dateparser
    textual
    tzlocal
    appdirs
  ];

  # 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; [ wesleyjrz ];
    maintainers = with maintainers; [ khaneliman wesleyjrz ];
  };
}