1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 mock,
6 pytestCheckHook,
7 python,
8 pythonOlder,
9 setuptools,
10 which,
11}:
12
13buildPythonPackage rec {
14 pname = "nodeenv";
15 version = "1.8.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "ekalinin";
22 repo = pname;
23 rev = "refs/tags/${version}";
24 hash = "sha256-aW/aNZbFXfP4bF/Nlvv419IDfaJRA1pJYM7awj+6Hz0=";
25 };
26
27 propagatedBuildInputs = [ setuptools ];
28
29 nativeCheckInputs = [
30 mock
31 pytestCheckHook
32 ];
33
34 preFixup = ''
35 substituteInPlace $out/${python.sitePackages}/nodeenv.py \
36 --replace '["which", candidate]' '["${lib.getBin which}/bin/which", candidate]'
37 '';
38
39 pythonImportsCheck = [ "nodeenv" ];
40
41 disabledTests = [
42 # Test requires coverage
43 "test_smoke"
44 ];
45
46 meta = with lib; {
47 description = "Node.js virtual environment builder";
48 mainProgram = "nodeenv";
49 homepage = "https://github.com/ekalinin/nodeenv";
50 changelog = "https://github.com/ekalinin/nodeenv/releases/tag/${version}";
51 license = licenses.bsd3;
52 maintainers = with maintainers; [ ];
53 };
54}