summary refs log tree commit diff
path: root/pkgs/development/python-modules/lazr/config.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/lazr/config.nix')
-rw-r--r--pkgs/development/python-modules/lazr/config.nix55
1 files changed, 48 insertions, 7 deletions
diff --git a/pkgs/development/python-modules/lazr/config.nix b/pkgs/development/python-modules/lazr/config.nix
index b10ad25972b..bc369705e26 100644
--- a/pkgs/development/python-modules/lazr/config.nix
+++ b/pkgs/development/python-modules/lazr/config.nix
@@ -1,13 +1,54 @@
-{ buildPythonPackage, fetchPypi, lazr_delegates }:
+{ lib
+, buildPythonPackage
+, fetchPypi
+, setuptools
+, lazr-delegates
+, zope_interface
+, pytestCheckHook
+}:
 
 buildPythonPackage rec {
-  pname = "lazr.config";
-  version = "2.2.3";
-
-  propagatedBuildInputs = [ lazr_delegates ];
+  pname = "lazr-config";
+  version = "3.0";
+  pyproject = true;
 
   src = fetchPypi {
-    inherit pname version;
-    sha256 = "b74a73f8b63e6dc6732fc1f3d88e2f236596ddf089ef6e1794ece060e8cfabe1";
+    pname = "lazr.config";
+    inherit version;
+    hash = "sha256-oU5PbMCa68HUCxdhWK6g7uIlLBQAO40O8LMcfFFMNkQ=";
+  };
+
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  propagatedBuildInputs = [
+    lazr-delegates
+    zope_interface
+  ];
+
+  pythonImportsCheck = [
+    "lazr.config"
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  # change the directory to avoid a namespace-related problem
+  # ModuleNotFoundError: No module named 'lazr.delegates'
+  preCheck = ''
+    cd $out
+  '';
+
+  pythonNamespaces = [
+    "lazr"
+  ];
+
+  meta = with lib; {
+    description = "Create configuration schemas, and process and validate configurations";
+    homepage = "https://launchpad.net/lazr.config";
+    changelog = "https://git.launchpad.net/lazr.config/tree/NEWS.rst?h=${version}";
+    license = licenses.lgpl3Only;
   };
 }