parent
e4c7b303df
commit
a0aea1e6c3
@ -1,31 +1,55 @@ |
|||||||
{ lib, buildPythonPackage, fetchPypi, setuptools, python, which }: |
{ lib |
||||||
|
, buildPythonPackage |
||||||
|
, fetchFromGitHub |
||||||
|
, mock |
||||||
|
, pytestCheckHook |
||||||
|
, python |
||||||
|
, pythonOlder |
||||||
|
, setuptools |
||||||
|
, which |
||||||
|
}: |
||||||
|
|
||||||
buildPythonPackage rec { |
buildPythonPackage rec { |
||||||
pname = "nodeenv"; |
pname = "nodeenv"; |
||||||
version = "1.7.0"; |
version = "1.7.0"; |
||||||
|
format = "setuptools"; |
||||||
|
|
||||||
src = fetchPypi { |
disabled = pythonOlder "3.7"; |
||||||
inherit pname version; |
|
||||||
sha256 = "sha256-4Of337hfxTlMb+Ho+pgTGiRz4EMRpFr7ZQj3zxg2+is="; |
src = fetchFromGitHub { |
||||||
|
owner = "ekalinin"; |
||||||
|
repo = pname; |
||||||
|
rev = version; |
||||||
|
hash = "sha256-X30PUiOMT/vXqmdSJKHTNNA8aLWavCUaKa7LzqkdLrk="; |
||||||
}; |
}; |
||||||
|
|
||||||
propagatedBuildInputs = [ |
propagatedBuildInputs = [ |
||||||
setuptools |
setuptools |
||||||
]; |
]; |
||||||
|
|
||||||
# Tests not included in PyPI tarball |
checkInputs = [ |
||||||
doCheck = false; |
mock |
||||||
|
pytestCheckHook |
||||||
|
]; |
||||||
|
|
||||||
preFixup = '' |
preFixup = '' |
||||||
substituteInPlace $out/${python.sitePackages}/nodeenv.py \ |
substituteInPlace $out/${python.sitePackages}/nodeenv.py \ |
||||||
--replace '["which", candidate]' '["${lib.getBin which}/bin/which", candidate]' |
--replace '["which", candidate]' '["${lib.getBin which}/bin/which", candidate]' |
||||||
''; |
''; |
||||||
|
|
||||||
pythonImportsCheck = [ "nodeenv" ]; |
pythonImportsCheck = [ |
||||||
|
"nodeenv" |
||||||
|
]; |
||||||
|
|
||||||
|
disabledTests = [ |
||||||
|
# Test requires coverage |
||||||
|
"test_smoke" |
||||||
|
]; |
||||||
|
|
||||||
meta = with lib; { |
meta = with lib; { |
||||||
description = "Node.js virtual environment builder"; |
description = "Node.js virtual environment builder"; |
||||||
homepage = "https://github.com/ekalinin/nodeenv"; |
homepage = "https://github.com/ekalinin/nodeenv"; |
||||||
license = licenses.bsd3; |
license = licenses.bsd3; |
||||||
|
maintainers = with maintainers; [ ]; |
||||||
}; |
}; |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue