Unverified Commit fce4c5c1 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #307249 from fabaff/taskw-ng-fix

python312Packages.taskw-ng: refactor
parents 18ab20f8 a8476d88
Loading
Loading
Loading
Loading
+26 −21
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, poetry-dynamic-versioning
, kitchen
, packaging
, python-dateutil
, pytz
, taskwarrior
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  kitchen,
  packaging,
  poetry-core,
  poetry-dynamic-versioning,
  python-dateutil,
  pythonOlder,
  pythonRelaxDepsHook,
  pytz,
  taskwarrior,
}:

buildPythonPackage rec {
@@ -15,23 +18,27 @@ buildPythonPackage rec {
  version = "0.2.6";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "bergercookie";
    repo = "taskw-ng";
    rev = "v${version}";
    rev = "refs/tags/v${version}";
    hash = "sha256-tlidTt0TzWnvfajYiIfvRv7OfakHY6zWAicmAwq/Z8w=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail 'pytz = "^2023.3.post1"' 'pytz = "*"'
  '';
  pythonRelaxDeps = [
    "packaging"
    "pytz"
  ];

  nativeBuildInputs = [
  build-system = [
    poetry-core
    poetry-dynamic-versioning
  ];

  nativeBuildInputs = [ pythonRelaxDepsHook ];

  propagatedBuildInputs = [
    kitchen
    packaging
@@ -39,18 +46,16 @@ buildPythonPackage rec {
    pytz
  ];

  checkInputs = [
    taskwarrior
  ];
  checkInputs = [ taskwarrior ];

  # TODO: doesn't pass because `can_use` fails and `task --version` seems not to be answering.
  # pythonImportsCheck = [ "taskw_ng" ];

  meta = with lib; {
    description = "";
    description = "Module to interact with the Taskwarrior API";
    homepage = "https://github.com/bergercookie/taskw-ng";
    changelog = "https://github.com/bergercookie/taskw-ng/blob/${src.rev}/CHANGELOG.rst";
    license = licenses.gpl3Only;
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ raitobezarius ];
  };
}