diff options
Diffstat (limited to 'pkgs/development/python-modules/pip/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pip/default.nix | 72 |
1 files changed, 48 insertions, 24 deletions
diff --git a/pkgs/development/python-modules/pip/default.nix b/pkgs/development/python-modules/pip/default.nix index 72b7eb88df727..058970320f90d 100644 --- a/pkgs/development/python-modules/pip/default.nix +++ b/pkgs/development/python-modules/pip/default.nix @@ -1,23 +1,33 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, installShellFiles -, mock -, scripttest -, setuptools -, virtualenv -, wheel -, pretend -, pytest - -# docs -, sphinx - -# coupled downsteam dependencies -, pip-tools +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + installShellFiles, + wheel, + setuptools, + + # docs + sphinx, + + # checks + freezegun, + git, + mock, + scripttest, + virtualenv, + pretend, + proxy-py, + pytestCheckHook, + tomli-w, + werkzeug, + + # coupled downsteam dependencies + pip-tools, }: -buildPythonPackage rec { +let self = buildPythonPackage rec { pname = "pip"; version = "24.0"; format = "pyproject"; @@ -71,11 +81,21 @@ buildPythonPackage rec { cd .. ''; - nativeCheckInputs = [ mock scripttest virtualenv pretend pytest ]; - - # Pip wants pytest, but tests are not distributed doCheck = false; + nativeCheckInputs = [ + freezegun + git + mock + scripttest + virtualenv + pretend + pytestCheckHook + proxy-py + tomli-w + werkzeug + ]; + postInstall = '' installManPage docs/build/man/* @@ -85,12 +105,16 @@ buildPythonPackage rec { --zsh <($out/bin/pip completion --zsh --no-cache-dir) ''; - passthru.tests = { inherit pip-tools; }; + passthru.tests = { + inherit pip-tools; + pytest = self.overridePythonAttrs { doCheck = true; }; + }; meta = { - description = "The PyPA recommended tool for installing Python packages"; + description = "PyPA recommended tool for installing Python packages"; license = with lib.licenses; [ mit ]; homepage = "https://pip.pypa.io/"; changelog = "https://pip.pypa.io/en/stable/news/#v${lib.replaceStrings [ "." ] [ "-" ] version}"; }; -} +}; +in self |