1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 nodejs,
7 pythonOlder,
8}:
9
10buildPythonPackage rec {
11 pname = "pscript";
12 version = "0.7.7";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "flexxui";
19 repo = pname;
20 rev = "refs/tags/v${version}";
21 hash = "sha256-AhVI+7FiWyH+DfAXnau4aAHJAJtsWEpmnU90ey2z35o=";
22 };
23
24 nativeCheckInputs = [
25 pytestCheckHook
26 nodejs
27 ];
28
29 preCheck = ''
30 # do not execute legacy tests
31 rm -rf pscript_legacy
32 '';
33
34 pythonImportsCheck = [ "pscript" ];
35
36 meta = with lib; {
37 description = "Python to JavaScript compiler";
38 homepage = "https://pscript.readthedocs.io";
39 changelog = "https://github.com/flexxui/pscript/blob/v${version}/docs/releasenotes.rst";
40 license = licenses.bsd2;
41 maintainers = with maintainers; [ matthiasbeyer ];
42 };
43}