3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/pip/default.nix

54 lines
1.2 KiB
Nix
Raw Normal View History

2018-04-08 07:40:08 +01:00
{ lib
, python
2018-04-08 07:40:08 +01:00
, buildPythonPackage
, bootstrapped-pip
, fetchFromGitHub
2018-04-08 07:40:08 +01:00
, mock
, scripttest
, virtualenv
, pretend
, pytest
, setuptools
, wheel
, isPy27
, fetchpatch
2018-04-08 07:40:08 +01:00
}:
buildPythonPackage rec {
pname = "pip";
version = "20.2.4";
format = "other";
2018-04-08 07:40:08 +01:00
src = fetchFromGitHub {
owner = "pypa";
repo = pname;
rev = version;
sha256 = "eMVV4ftgV71HLQsSeaOchYlfaJVgzNrwUynn3SA1/Do=";
name = "${pname}-${version}-source";
2018-04-08 07:40:08 +01:00
};
nativeBuildInputs = [ bootstrapped-pip ];
patches = lib.optionals isPy27 [
(fetchpatch {
url = "https://github.com/pypa/pip/commit/94fbb6cf78c267bf7cdf83eeeb2536ad56cfe639.patch";
sha256 = "Z6x5yxBp8QkU/GOfb1ltI0dVt//MaI09XK3cdY42kFs=";
})
];
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.
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";
license = with lib.licenses; [ mit ];
homepage = "https://pip.pypa.io/";
2018-04-08 07:40:08 +01:00
priority = 10;
};
2018-04-14 16:12:10 +01:00
}