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