2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
virtualenv,
|
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "virtualenv-clone";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "0.5.7";
|
2021-08-27 14:25:00 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "edwardgeorge";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-qrN74IwLRqiVPxU8gVhdiM34yBmiS/5ot07uroYPDVw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/__init__.py \
|
2023-05-24 13:37:59 +00:00
|
|
|
--replace "'virtualenv'" "'${virtualenv}/bin/virtualenv'" \
|
2024-05-15 15:35:15 +00:00
|
|
|
--replace "'3.9', '3.10']" "'3.9', '3.10', '3.11', '3.12']" # if the Python version used isn't in this list, tests fail
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
substituteInPlace tests/test_virtualenv_sys.py \
|
|
|
|
--replace "'virtualenv'" "'${virtualenv}/bin/virtualenv'"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ virtualenv ];
|
2021-08-27 14:25:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/edwardgeorge/virtualenv-clone";
|
|
|
|
description = "Script to clone virtualenvs";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "virtualenv-clone";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2021-08-27 14:25:00 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|