1{ lib
2, python3
3, fetchFromGitLab
4, fetchFromGitHub
5}:
6let
7 python = python3.override {
8 packageOverrides = self: super: {
9 lark010 = super.lark.overridePythonAttrs (old: rec {
10 version = "0.10.0";
11
12 src = fetchFromGitHub {
13 owner = "lark-parser";
14 repo = "lark";
15 rev = "refs/tags/${version}";
16 sha256 = "sha256-ctdPPKPSD4weidyhyj7RCV89baIhmuxucF3/Ojx1Efo=";
17 };
18
19 disabledTestPaths = [ "tests/test_nearley/test_nearley.py" ];
20 });
21 };
22 self = python;
23 };
24in
25python.pkgs.buildPythonApplication rec {
26 pname = "sca2d";
27 version = "0.2.0";
28 format = "setuptools";
29
30 src = fetchFromGitLab {
31 owner = "bath_open_instrumentation_group";
32 repo = "sca2d";
33 rev = "v${version}";
34 hash = "sha256-P+7g57AH8H7q0hBE2I9w8A+bN5M6MPbc9gA0b889aoQ=";
35 };
36
37 propagatedBuildInputs = with python.pkgs; [ lark010 colorama ];
38
39 pythonImportsCheck = [ "sca2d" ];
40
41 meta = with lib; {
42 description = "An experimental static code analyser for OpenSCAD";
43 homepage = "https://gitlab.com/bath_open_instrumentation_group/sca2d";
44 changelog = "https://gitlab.com/bath_open_instrumentation_group/sca2d/-/blob/${src.rev}/CHANGELOG.md";
45 license = licenses.gpl3Only;
46 maintainers = with maintainers; [ traxys ];
47 };
48}