diff --git a/pkgs/development/python-modules/incremental/default.nix b/pkgs/development/python-modules/incremental/default.nix index db600c27aa1a..e64c5275d5d6 100644 --- a/pkgs/development/python-modules/incremental/default.nix +++ b/pkgs/development/python-modules/incremental/default.nix @@ -1,23 +1,36 @@ { - lib, buildPythonPackage, - fetchPypi, click, + fetchFromGitHub, + lib, + pythonOlder, + setuptools, + tomli, twisted, }: let incremental = buildPythonPackage rec { pname = "incremental"; - version = "22.10.0"; - format = "setuptools"; + version = "24.7.2"; + pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-kS/uteD34BiOb0IkHS9FAALhG7wJN8ZYZQRYVMJMC9A="; + src = fetchFromGitHub { + owner = "twisted"; + repo = "incremental"; + rev = "refs/tags/incremental-${version}"; + hash = "sha256-5MlIKUaBUwLTet23Rjd2Opf5e54LcHuZDowcGon0lOE="; }; - propagatedBuildInputs = [ click ]; + # From upstream's pyproject.toml: + # "Keep this aligned with the project dependencies." + build-system = dependencies; + + dependencies = [ setuptools ] ++ lib.optionals (pythonOlder "3.11") [ tomli ]; + + optional-dependencies = { + scripts = [ click ]; + }; # escape infinite recursion with twisted doCheck = false; @@ -36,11 +49,12 @@ let pythonImportsCheck = [ "incremental" ]; - meta = with lib; { + meta = { + changelog = "https://github.com/twisted/incremental/blob/${src.rev}/NEWS.rst"; homepage = "https://github.com/twisted/incremental"; - description = "Incremental is a small library that versions your Python projects"; - license = licenses.mit; - maintainers = [ ]; + description = "Small library that versions your Python projects"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; }; }; in