nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 bootstrapped-pip,
5 fetchFromGitHub,
6 scripttest,
7 virtualenv,
8 pretend,
9}:
10
11buildPythonPackage rec {
12 pname = "pip";
13 version = "20.3.4";
14 format = "other";
15
16 src = fetchFromGitHub {
17 owner = "pypa";
18 repo = pname;
19 rev = version;
20 sha256 = "0hkhs9yc1cjdj1gn9wkycd3sy65c05q8k8rhqgsm5jbpksfssiwn";
21 name = "${pname}-${version}-source";
22 };
23
24 nativeBuildInputs = [ bootstrapped-pip ];
25
26 # pip detects that we already have bootstrapped_pip "installed", so we need
27 # to force it a little.
28 pipInstallFlags = [ "--ignore-installed" ];
29
30 nativeCheckInputs = [
31 scripttest
32 virtualenv
33 pretend
34 ];
35
36 # Pip wants pytest, but tests are not distributed
37 doCheck = false;
38
39 meta = {
40 description = "PyPA recommended tool for installing Python packages";
41 license = with lib.licenses; [ mit ];
42 homepage = "https://pip.pypa.io/";
43 priority = 10;
44 };
45}