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