about summary refs log tree commit diff
path: root/pkgs/development/python-modules/textx/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/textx/default.nix')
-rw-r--r--pkgs/development/python-modules/textx/default.nix113
1 files changed, 55 insertions, 58 deletions
diff --git a/pkgs/development/python-modules/textx/default.nix b/pkgs/development/python-modules/textx/default.nix
index 46847572714c7..9244644395784 100644
--- a/pkgs/development/python-modules/textx/default.nix
+++ b/pkgs/development/python-modules/textx/default.nix
@@ -1,54 +1,35 @@
-{ lib
-, buildPythonPackage
-, python
-, fetchFromGitHub
-, mkdocs
-, twine
-, arpeggio
-, click
-, future
-, setuptools
-, callPackage
-, gprof2dot
-, html5lib
-, jinja2
-, psutil
-, pytestCheckHook
+{
+  lib,
+  buildPythonPackage,
+  python,
+  fetchFromGitHub,
+  arpeggio,
+  click,
+  callPackage,
+  flit-core,
 }:
 
 let
   textx = buildPythonPackage rec {
     pname = "textx";
-    version = "3.0.0";
-    format = "setuptools";
+    version = "4.0.1";
+    pyproject = true;
 
     src = fetchFromGitHub {
       owner = pname;
       repo = pname;
       rev = version;
-      hash = "sha256-uZlO82dKtWQQR5+Q7dWk3+ZoUzAjDJ8qzC4UMLCtnBk=";
+      hash = "sha256-qiKOG6B7yWWzkL7bmcRAVv6AOHKTWmrlrsJlXD5RoaQ=";
     };
 
-    postPatch = ''
-      substituteInPlace setup.cfg --replace "click >=7.0, <8.0" "click >=7.0"
-    '';
-
     outputs = [
       "out"
       "testout"
     ];
 
-    nativeBuildInputs = [
-      mkdocs
-      twine
-    ];
+    build-system = [ flit-core ];
 
-    propagatedBuildInputs = [
-      arpeggio
-      click
-      future
-      setuptools
-    ];
+    dependencies = [ arpeggio ];
 
     postInstall = ''
       # FileNotFoundError: [Errno 2] No such file or directory: '$out/lib/python3.10/site-packages/textx/textx.tx
@@ -59,9 +40,7 @@ let
       cp -r tests $testout/tests
     '';
 
-    pythonImportsCheck = [
-      "textx"
-    ];
+    pythonImportsCheck = [ "textx" ];
 
     # Circular dependencies, do tests in passthru.tests instead.
     doCheck = false;
@@ -73,8 +52,9 @@ let
           textx-example-project
           textx-flow-codegen
           textx-flow-dsl
-          textx-types-dsl;
-       };
+          textx-types-dsl
+          ;
+      };
     };
 
     meta = with lib; {
@@ -89,16 +69,19 @@ let
   textx-data-dsl = buildPythonPackage rec {
     pname = "textx-data-dsl";
     version = "1.0.0";
+    pyproject = true;
+
     inherit (textx) src;
-    # `format` isn't included in the output of `mk-python-derivation`.
-    # So can't inherit format: `error: attribute 'format' missing`.
-    format = "setuptools";
     pathToSourceRoot = "tests/functional/registration/projects/data_dsl";
     sourceRoot = "${src.name}/" + pathToSourceRoot;
-    propagatedBuildInputs = [
+
+    build-system = [ flit-core ];
+
+    dependencies = [
       textx
       textx-types-dsl
     ];
+
     meta = with lib; {
       inherit (textx.meta) license maintainers;
       description = "Sample textX language for testing";
@@ -109,14 +92,19 @@ let
   textx-flow-codegen = buildPythonPackage rec {
     pname = "textx-flow-codegen";
     version = "1.0.0";
+    pyproject = true;
+
     inherit (textx) src;
-    format = "setuptools";
+
     pathToSourceRoot = "tests/functional/registration/projects/flow_codegen";
     sourceRoot = "${src.name}/" + pathToSourceRoot;
-    propagatedBuildInputs = [
-      click
+
+    build-system = [ flit-core ];
+    dependencies = [
       textx
+      click
     ];
+
     meta = with lib; {
       inherit (textx.meta) license maintainers;
       description = "Sample textX language for testing";
@@ -127,13 +115,16 @@ let
   textx-flow-dsl = buildPythonPackage rec {
     pname = "textx-flow-dsl";
     version = "1.0.0";
+    pyproject = true;
+
     inherit (textx) src;
-    format = "setuptools";
+
     pathToSourceRoot = "tests/functional/registration/projects/flow_dsl";
     sourceRoot = "${src.name}/" + pathToSourceRoot;
-    propagatedBuildInputs = [
-      textx
-    ];
+
+    build-system = [ flit-core ];
+    dependencies = [ textx ];
+
     meta = with lib; {
       inherit (textx.meta) license maintainers;
       description = "Sample textX language for testing";
@@ -144,13 +135,16 @@ let
   textx-types-dsl = buildPythonPackage rec {
     pname = "textx-types-dsl";
     version = "1.0.0";
+    pyproject = true;
+
     inherit (textx) src;
-    format = "setuptools";
+
     pathToSourceRoot = "tests/functional/registration/projects/types_dsl";
     sourceRoot = "${src.name}/" + pathToSourceRoot;
-    propagatedBuildInputs = [
-      textx
-    ];
+
+    build-system = [ flit-core ];
+    dependencies = [ textx ];
+
     meta = with lib; {
       inherit (textx.meta) license maintainers;
       description = "Sample textX language for testing";
@@ -161,13 +155,16 @@ let
   textx-example-project = buildPythonPackage rec {
     pname = "textx-example-project";
     version = "1.0.0";
+    pyproject = true;
+
     inherit (textx) src;
-    format = "setuptools";
+
     pathToSourceRoot = "tests/functional/subcommands/example_project";
     sourceRoot = "${src.name}/" + pathToSourceRoot;
-    propagatedBuildInputs = [
-      textx
-    ];
+
+    build-system = [ flit-core ];
+    dependencies = [ textx ];
+
     meta = with lib; {
       inherit (textx.meta) license maintainers;
       description = "Sample textX sub-command for testing";
@@ -175,4 +172,4 @@ let
     };
   };
 in
-  textx
+textx