about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/sca2d/default.nix
blob: c23714bc872f6c1691c97eabdb2e441149fe39ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ lib
, python3
, fetchFromGitLab
, fetchFromGitHub
}:
let
  python = python3.override {
    packageOverrides = self: super: {
      lark010 = super.lark.overridePythonAttrs (old: rec {
        version = "0.10.0";

        src = fetchFromGitHub {
          owner = "lark-parser";
          repo = "lark";
          rev = "refs/tags/${version}";
          sha256 = "sha256-ctdPPKPSD4weidyhyj7RCV89baIhmuxucF3/Ojx1Efo=";
        };

        patches = [ ];

        disabledTestPaths = [ "tests/test_nearley/test_nearley.py" ];
      });
    };
    self = python;
  };
in
python.pkgs.buildPythonApplication rec {
  pname = "sca2d";
  version = "0.2.0";
  format = "setuptools";

  src = fetchFromGitLab {
    owner = "bath_open_instrumentation_group";
    repo = "sca2d";
    rev = "v${version}";
    hash = "sha256-P+7g57AH8H7q0hBE2I9w8A+bN5M6MPbc9gA0b889aoQ=";
  };

  propagatedBuildInputs = with python.pkgs; [ lark010 colorama ];

  pythonImportsCheck = [ "sca2d" ];

  meta = with lib; {
    description = "An experimental static code analyser for OpenSCAD";
    mainProgram = "sca2d";
    homepage = "https://gitlab.com/bath_open_instrumentation_group/sca2d";
    changelog = "https://gitlab.com/bath_open_instrumentation_group/sca2d/-/blob/${src.rev}/CHANGELOG.md";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ traxys ];
  };
}