2017-07-07 16:57:30 +01:00
|
|
|
{ buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, lib
|
2020-05-22 15:19:47 +01:00
|
|
|
, stdenv
|
|
|
|
, pythonOlder
|
|
|
|
, isPy27
|
|
|
|
, appdirs
|
|
|
|
, contextlib2
|
|
|
|
, distlib
|
|
|
|
, filelock
|
|
|
|
, importlib-metadata
|
|
|
|
, importlib-resources
|
|
|
|
, pathlib2
|
|
|
|
, setuptools_scm
|
|
|
|
, six
|
2017-07-07 16:57:30 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "virtualenv";
|
2020-08-29 12:41:52 +01:00
|
|
|
version = "20.0.31";
|
2017-07-07 16:57:30 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-29 12:41:52 +01:00
|
|
|
sha256 = "43add625c53c596d38f971a465553f6318decc39d98512bc100fa1b1e839c8dc";
|
2017-07-07 16:57:30 +01:00
|
|
|
};
|
|
|
|
|
2020-05-22 15:19:47 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools_scm
|
|
|
|
];
|
2017-07-07 16:57:30 +01:00
|
|
|
|
2020-05-22 15:19:47 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
appdirs
|
|
|
|
distlib
|
|
|
|
filelock
|
|
|
|
six
|
|
|
|
] ++ lib.optionals isPy27 [
|
|
|
|
contextlib2
|
|
|
|
] ++ lib.optionals (isPy27 && !stdenv.hostPlatform.isWindows) [
|
|
|
|
pathlib2
|
|
|
|
] ++ lib.optionals (pythonOlder "3.7") [
|
|
|
|
importlib-resources
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
2017-07-07 16:57:30 +01:00
|
|
|
|
2020-05-24 08:35:45 +01:00
|
|
|
patches = lib.optionals (isPy27) [
|
|
|
|
./0001-Check-base_prefix-and-base_exec_prefix-for-Python-2.patch
|
|
|
|
];
|
|
|
|
|
2017-07-07 16:57:30 +01:00
|
|
|
meta = {
|
|
|
|
description = "A tool to create isolated Python environments";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.virtualenv.org";
|
2017-07-07 16:57:30 +01:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ goibhniu ];
|
|
|
|
};
|
2020-04-01 02:11:51 +01:00
|
|
|
}
|