56727dc1ff
Since wheel support was introduced in 2015 we always relied on pre-built wheels for bootstrapping. Now, we can bootstrap directly from the sources of these packages in git. The `bootstrapped-pip` packages is used to build `pip`, `setuptools` and `wheel`, after which those packages are used to build everything else. Note that when building `bootstrapped-pip` some errors are shown. These are not important, the build actually does succeed and work as intended.
45 lines
959 B
Nix
45 lines
959 B
Nix
{ lib
|
|
, python
|
|
, buildPythonPackage
|
|
, bootstrapped-pip
|
|
, fetchFromGitHub
|
|
, mock
|
|
, scripttest
|
|
, virtualenv
|
|
, pretend
|
|
, pytest
|
|
, setuptools
|
|
, wheel
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pip";
|
|
version = "19.3.1";
|
|
format = "other";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pypa";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "079gz0v37ah1l4i5iwyfb0d3mni422yv5ynnxa0wcqpnvkc7sfnw";
|
|
name = "${pname}-${version}-source";
|
|
};
|
|
|
|
nativeBuildInputs = [ bootstrapped-pip ];
|
|
|
|
# pip detects that we already have bootstrapped_pip "installed", so we need
|
|
# to force it a little.
|
|
pipInstallFlags = [ "--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 = with lib.licenses; [ mit ];
|
|
homepage = https://pip.pypa.io/;
|
|
priority = 10;
|
|
};
|
|
}
|