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