diff options
author | figsoda <figsoda@pm.me> | 2023-01-17 11:46:03 -0500 |
---|---|---|
committer | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2023-01-21 08:21:33 +0100 |
commit | 3290828905a77069b6d51cafb7a6a8669a51bb11 (patch) | |
tree | 7d6562755dfe17fbbfbe416baa392fac553e9dc5 | |
parent | a72e215c758b3d80a5e540236aac5622c34be140 (diff) |
fetchPypi: move to top level
fetchPypi doesn't use python under the hood and doesn't need to be tied
to a specific version of python. Moving it to top level makes it more
consistent with other fetchers and makes code generation easier.
-rw-r--r-- | pkgs/build-support/fetchpypi/default.nix (renamed from pkgs/development/interpreters/python/fetchpypi.nix) | 0 | ||||
-rw-r--r-- | pkgs/development/interpreters/python/python-packages-base.nix | 4 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/development/interpreters/python/fetchpypi.nix b/pkgs/build-support/fetchpypi/default.nix index ebd277cd2bdf..ebd277cd2bdf 100644 --- a/pkgs/development/interpreters/python/fetchpypi.nix +++ b/pkgs/build-support/fetchpypi/default.nix diff --git a/pkgs/development/interpreters/python/python-packages-base.nix b/pkgs/development/interpreters/python/python-packages-base.nix index 92b0a456b077..d5b02223fd6c 100644 --- a/pkgs/development/interpreters/python/python-packages-base.nix +++ b/pkgs/development/interpreters/python/python-packages-base.nix @@ -41,8 +41,6 @@ let # See build-setupcfg/default.nix for documentation. buildSetupcfg = import ../../../build-support/build-setupcfg self; - fetchPypi = callPackage ./fetchpypi.nix { }; - # Check whether a derivation provides a Python module. hasPythonModule = drv: drv?pythonModule && drv.pythonModule == python; @@ -89,7 +87,7 @@ in { inherit lib pkgs stdenv; inherit (python.passthru) isPy27 isPy37 isPy38 isPy39 isPy310 isPy311 isPy3k isPyPy pythonAtLeast pythonOlder; inherit buildPythonPackage buildPythonApplication; - inherit fetchPypi; + inherit (pkgs) fetchPypi; inherit hasPythonModule requiredPythonModules makePythonPath disabled disabledIf; inherit toPythonModule toPythonApplication; inherit buildSetupcfg; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2a5d3d46f7f1..e072453f0c9d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -935,6 +935,8 @@ with pkgs; fetchgx = callPackage ../build-support/fetchgx { }; + fetchPypi = callPackage ../build-support/fetchpypi { }; + resolveMirrorURLs = {url}: fetchurl { showURLs = true; inherit url; |