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