2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, python
|
|
|
|
, pythonOlder
|
|
|
|
, setuptools
|
|
|
|
, which
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nodeenv";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "1.7.0";
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ekalinin";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-X30PUiOMT/vXqmdSJKHTNNA8aLWavCUaKa7LzqkdLrk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
preFixup = ''
|
|
|
|
substituteInPlace $out/${python.sitePackages}/nodeenv.py \
|
|
|
|
--replace '["which", candidate]' '["${lib.getBin which}/bin/which", candidate]'
|
|
|
|
'';
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"nodeenv"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Test requires coverage
|
|
|
|
"test_smoke"
|
|
|
|
];
|
2022-04-15 01:41:22 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Node.js virtual environment builder";
|
|
|
|
homepage = "https://github.com/ekalinin/nodeenv";
|
|
|
|
license = licenses.bsd3;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|