2018-04-08 06:40:08 +00:00
|
|
|
{ lib
|
2019-07-17 18:36:47 +00:00
|
|
|
, python
|
2018-04-08 06:40:08 +00:00
|
|
|
, buildPythonPackage
|
2019-07-17 18:36:47 +00:00
|
|
|
, bootstrapped-pip
|
2019-10-20 13:33:35 +00:00
|
|
|
, fetchFromGitHub
|
2018-04-08 06:40:08 +00:00
|
|
|
, mock
|
|
|
|
, scripttest
|
|
|
|
, virtualenv
|
|
|
|
, pretend
|
|
|
|
, pytest
|
2019-07-17 18:36:47 +00:00
|
|
|
, setuptools
|
|
|
|
, wheel
|
2020-11-05 15:09:24 +00:00
|
|
|
, isPy27
|
|
|
|
, fetchpatch
|
2018-04-08 06:40:08 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pip";
|
2020-11-05 13:55:02 +00:00
|
|
|
version = "20.2.4";
|
2019-07-17 18:36:47 +00:00
|
|
|
format = "other";
|
2018-04-08 06:40:08 +00:00
|
|
|
|
2019-10-20 13:33:35 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pypa";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-11-05 13:55:02 +00:00
|
|
|
sha256 = "eMVV4ftgV71HLQsSeaOchYlfaJVgzNrwUynn3SA1/Do=";
|
2019-10-20 13:33:35 +00:00
|
|
|
name = "${pname}-${version}-source";
|
2018-04-08 06:40:08 +00:00
|
|
|
};
|
|
|
|
|
2019-07-17 18:36:47 +00:00
|
|
|
nativeBuildInputs = [ bootstrapped-pip ];
|
|
|
|
|
2020-11-05 15:09:24 +00:00
|
|
|
patches = lib.optionals isPy27 [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/pypa/pip/commit/94fbb6cf78c267bf7cdf83eeeb2536ad56cfe639.patch";
|
|
|
|
sha256 = "Z6x5yxBp8QkU/GOfb1ltI0dVt//MaI09XK3cdY42kFs=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-04-08 06:40:08 +00:00
|
|
|
# pip detects that we already have bootstrapped_pip "installed", so we need
|
|
|
|
# to force it a little.
|
2019-07-17 18:36:47 +00:00
|
|
|
pipInstallFlags = [ "--ignore-installed" ];
|
2018-04-08 06:40:08 +00: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 13:33:35 +00:00
|
|
|
license = with lib.licenses; [ mit ];
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://pip.pypa.io/";
|
2018-04-08 06:40:08 +00:00
|
|
|
priority = 10;
|
|
|
|
};
|
2018-04-14 15:12:10 +00:00
|
|
|
}
|