1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 virtualenv,
6 pytestCheckHook,
7}:
8
9buildPythonPackage rec {
10 pname = "virtualenv-clone";
11 version = "0.5.7";
12 format = "setuptools";
13
14 src = fetchFromGitHub {
15 owner = "edwardgeorge";
16 repo = pname;
17 rev = version;
18 hash = "sha256-qrN74IwLRqiVPxU8gVhdiM34yBmiS/5ot07uroYPDVw=";
19 };
20
21 postPatch = ''
22 substituteInPlace tests/__init__.py \
23 --replace "'virtualenv'" "'${virtualenv}/bin/virtualenv'" \
24 --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
25
26 substituteInPlace tests/test_virtualenv_sys.py \
27 --replace "'virtualenv'" "'${virtualenv}/bin/virtualenv'"
28 '';
29
30 propagatedBuildInputs = [ virtualenv ];
31
32 nativeCheckInputs = [ pytestCheckHook ];
33
34 meta = with lib; {
35 homepage = "https://github.com/edwardgeorge/virtualenv-clone";
36 description = "Script to clone virtualenvs";
37 mainProgram = "virtualenv-clone";
38 license = licenses.mit;
39 maintainers = [ ];
40 };
41}