From 4421dbc2175a8402a31580c8d146b716ec2b6ad2 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 8 Apr 2018 08:40:08 +0200 Subject: [PATCH] python.pkgs.pip: move expression --- .../python-modules/pip/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 26 +------------- 2 files changed, 35 insertions(+), 25 deletions(-) create mode 100644 pkgs/development/python-modules/pip/default.nix diff --git a/pkgs/development/python-modules/pip/default.nix b/pkgs/development/python-modules/pip/default.nix new file mode 100644 index 000000000000..1da0cc1da5b5 --- /dev/null +++ b/pkgs/development/python-modules/pip/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchPypi +, mock +, scripttest +, virtualenv +, pretend +, pytest +}: + +buildPythonPackage rec { + pname = "pip"; + version = "9.0.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "09f243e1a7b461f654c26a725fa373211bb7ff17a9300058b205c61658ca940d"; + }; + + # pip detects that we already have bootstrapped_pip "installed", so we need + # to force it a little. + installFlags = [ "--ignore-installed" ]; + + checkInputs = [ mock scripttest virtualenv pretend pytest ]; + # Pip wants pytest, but tests are not distributed + doCheck = false; + + meta = { + description = "The PyPA recommended tool for installing Python packages"; + license = lib.licenses.mit; + homepage = https://pip.pypa.io/; + priority = 10; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e37d17f8fd14..6b694e727352 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10029,31 +10029,7 @@ in { piexif = callPackage ../development/python-modules/piexif { }; - pip = buildPythonPackage rec { - pname = "pip"; - version = "9.0.1"; - name = "${pname}-${version}"; - - src = pkgs.fetchurl { - url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz"; - sha256 = "09f243e1a7b461f654c26a725fa373211bb7ff17a9300058b205c61658ca940d"; - }; - - # pip detects that we already have bootstrapped_pip "installed", so we need - # to force it a little. - installFlags = [ "--ignore-installed" ]; - - checkInputs = with self; [ mock scripttest virtualenv pretend pytest ]; - # Pip wants pytest, but tests are not distributed - doCheck = false; - - meta = { - description = "The PyPA recommended tool for installing Python packages"; - license = licenses.mit; - homepage = https://pip.pypa.io/; - priority = 10; - }; - }; + pip = callPackage ../development/python-modules/pip { }; pip-tools = callPackage ../development/python-modules/pip-tools { git = pkgs.gitMinimal;