2018-04-08 07:40:08 +01:00
|
|
|
{ lib
|
2019-07-17 19:36:47 +01:00
|
|
|
, python
|
2018-04-08 07:40:08 +01:00
|
|
|
, buildPythonPackage
|
2019-07-17 19:36:47 +01:00
|
|
|
, bootstrapped-pip
|
2019-10-20 14:33:35 +01:00
|
|
|
, fetchFromGitHub
|
2018-04-08 07:40:08 +01:00
|
|
|
, mock
|
|
|
|
, scripttest
|
|
|
|
, virtualenv
|
|
|
|
, pretend
|
|
|
|
, pytest
|
2019-07-17 19:36:47 +01:00
|
|
|
, setuptools
|
|
|
|
, wheel
|
2018-04-08 07:40:08 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pip";
|
2020-05-09 10:55:03 +01:00
|
|
|
version = "20.1";
|
2019-07-17 19:36:47 +01:00
|
|
|
format = "other";
|
2018-04-08 07:40:08 +01:00
|
|
|
|
2019-10-20 14:33:35 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pypa";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-05-09 10:55:03 +01:00
|
|
|
hash = "sha256:0s9z72cpa15p2bp7zq1lid8k2ykrznfzjwpq5f41v3f30faraxg7";
|
2019-10-20 14:33:35 +01:00
|
|
|
name = "${pname}-${version}-source";
|
2018-04-08 07:40:08 +01:00
|
|
|
};
|
|
|
|
|
2019-07-17 19:36:47 +01:00
|
|
|
nativeBuildInputs = [ bootstrapped-pip ];
|
|
|
|
|
2018-04-08 07:40:08 +01:00
|
|
|
# pip detects that we already have bootstrapped_pip "installed", so we need
|
|
|
|
# to force it a little.
|
2019-07-17 19:36:47 +01:00
|
|
|
pipInstallFlags = [ "--ignore-installed" ];
|
2018-04-08 07:40:08 +01:00
|
|
|
|
|
|
|
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";
|
2019-10-20 14:33:35 +01:00
|
|
|
license = with lib.licenses; [ mit ];
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://pip.pypa.io/";
|
2018-04-08 07:40:08 +01:00
|
|
|
priority = 10;
|
|
|
|
};
|
2018-04-14 16:12:10 +01:00
|
|
|
}
|