about summary refs log tree commit diff
path: root/pkgs/development/tools/sca2d
diff options
context:
space:
mode:
authortraxys <quentin+dev@familleboyer.net>2023-04-12 18:50:55 +0200
committerGitHub <noreply@github.com>2023-04-12 18:50:55 +0200
commit116a0fb6c158c8b74306a11810bb2cc6b81dab7c (patch)
tree033a1851c4201bcde89787217c06b24e1dbc8adc /pkgs/development/tools/sca2d
parenta76b55eab5afa68d51fb455896f69cc3daee262f (diff)
sca2d: init at 0.2.0 (#223097)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/development/tools/sca2d')
-rw-r--r--pkgs/development/tools/sca2d/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/development/tools/sca2d/default.nix b/pkgs/development/tools/sca2d/default.nix
new file mode 100644
index 0000000000000..eb28e7acb026c
--- /dev/null
+++ b/pkgs/development/tools/sca2d/default.nix
@@ -0,0 +1,48 @@
+{ 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=";
+        };
+
+        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";
+    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 ];
+  };
+}