1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6}:
7
8buildPythonPackage rec {
9 pname = "pydsdl";
10 version = "1.18.0";
11 format = "setuptools";
12
13 disabled = pythonOlder "3.7";
14
15 src = fetchFromGitHub {
16 owner = "OpenCyphal";
17 repo = pname;
18 rev = "refs/tags/${version}";
19 hash = "sha256-sn7KoJmJbr7Y+N9PAXyhJnts/hW+Gi06nrHj5VIDZMU=";
20 };
21
22 # allow for writable directory for darwin
23 preBuild = ''
24 export HOME=$TMPDIR
25 '';
26
27 # Module doesn't contain tests
28 doCheck = false;
29
30 pythonImportsCheck = [ "pydsdl" ];
31
32 meta = with lib; {
33 description = "Library to process Cyphal DSDL";
34 longDescription = ''
35 PyDSDL is a Cyphal DSDL compiler front-end implemented in Python. It accepts
36 a DSDL namespace at the input and produces a well-annotated abstract syntax
37 tree (AST) at the output, evaluating all constant expressions in the process.
38 All DSDL features defined in the Cyphal Specification are supported. The
39 library should, in theory, work on any platform and with any Python
40 implementation.
41 '';
42 homepage = "https://pydsdl.readthedocs.io/";
43 license = licenses.mit;
44 maintainers = with maintainers; [ wucke13 ];
45 };
46}