2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchPypi,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonAtLeast,
|
|
|
|
setuptools,
|
|
|
|
tzlocal,
|
|
|
|
six,
|
|
|
|
pyjsparser,
|
2022-08-21 13:32:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "js2py";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.74";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
# broken with Python 3.12
|
|
|
|
# https://github.com/PiotrDabkowski/Js2Py/issues/317
|
|
|
|
disabled = pythonAtLeast "3.12";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
pname = "Js2Py";
|
|
|
|
inherit version;
|
|
|
|
hash = "sha256-OfOmqoRpGA77o8hncnHfJ8MTMv0bRx3xryr1i4e4ly8=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyjsparser
|
|
|
|
six
|
|
|
|
tzlocal
|
|
|
|
];
|
|
|
|
|
|
|
|
# Test require network connection
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "js2py" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "JavaScript to Python Translator & JavaScript interpreter written in 100% pure Python";
|
|
|
|
homepage = "https://github.com/PiotrDabkowski/Js2Py";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ onny ];
|
|
|
|
};
|
|
|
|
}
|