about summary refs log tree commit diff
path: root/pkgs/applications/science/engineering
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2023-05-17 20:34:49 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2023-05-17 20:34:49 +0200
commit5e342e2a4b1d749cc4fbe31c196e04967c41a57a (patch)
tree9794593a7693924714645715e78ef34e1f357d7b /pkgs/applications/science/engineering
parent9318364586592bb95c8b1091427a501348960971 (diff)
strictdoc: 0.0.26 -> 0.0.40
Diffstat (limited to 'pkgs/applications/science/engineering')
-rw-r--r--pkgs/applications/science/engineering/strictdoc/conftest.py.patch15
-rw-r--r--pkgs/applications/science/engineering/strictdoc/default.nix78
2 files changed, 32 insertions, 61 deletions
diff --git a/pkgs/applications/science/engineering/strictdoc/conftest.py.patch b/pkgs/applications/science/engineering/strictdoc/conftest.py.patch
deleted file mode 100644
index 2fadf242b7a37..0000000000000
--- a/pkgs/applications/science/engineering/strictdoc/conftest.py.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py
-index 932747c..9b3d6ac 100644
---- a/tests/unit/conftest.py
-+++ b/tests/unit/conftest.py
-@@ -1,9 +1,7 @@
- import os
- import sys
- 
--STRICTDOC_ROOT_PATH = os.path.abspath(
--    os.path.join(__file__, "../../../../strictdoc")
--)
-+STRICTDOC_ROOT_PATH = "@strictdoc_root_path@"
- assert os.path.exists(STRICTDOC_ROOT_PATH), "does not exist: {}".format(
-     STRICTDOC_ROOT_PATH
- )
diff --git a/pkgs/applications/science/engineering/strictdoc/default.nix b/pkgs/applications/science/engineering/strictdoc/default.nix
index aaf944fdd01e0..54a4e21a3f60e 100644
--- a/pkgs/applications/science/engineering/strictdoc/default.nix
+++ b/pkgs/applications/science/engineering/strictdoc/default.nix
@@ -1,79 +1,61 @@
 { lib
-, stdenv
-, buildPythonApplication
 , fetchFromGitHub
 , python3
-, html5lib
-, invoke
-, openpyxl
-, poetry-core
-, tidylib
-, beautifulsoup4
-, datauri
-, docutils
-, jinja2
-, lxml
-, markupsafe
-, pygments
-, reqif
-, setuptools
-, textx
-, xlrd
-, xlsxwriter
-, pytestCheckHook
 }:
 
-buildPythonApplication rec {
+python3.pkgs.buildPythonApplication rec {
   pname = "strictdoc";
-  version = "0.0.26";
+  version = "0.0.40";
   format = "pyproject";
 
   src = fetchFromGitHub {
     owner = "strictdoc-project";
     repo = pname;
-    rev = version;
-    sha256 = "sha256-SMAwji75AjW8CzXRKBDF+fR/a5++GhgIvkcuD+a/vp4=";
+    rev = "refs/tags/${version}";
+    hash = "sha256-kZ8qVhroSPSGAcgUFZb1vRI6JoFyjeg/0qYosbRnwyc=";
   };
 
-  patches = [
-    ./conftest.py.patch
-  ];
-
   postPatch = ''
-    substituteInPlace ./tests/unit/conftest.py \
-      --replace @strictdoc_root_path@ "${placeholder "out"}/${python3.sitePackages}/strictdoc"
-
-    substituteInPlace requirements.txt \
-      --replace "jinja2 >= 2.11.2, <3.0" "jinja2 >= 2.11.2" \
-      --replace "reqif >= 0.0.18, == 0.*" "reqif>=0.0.8" \
-      --replace "==" ">=" \
-      --replace "~=" ">="
+    substituteInPlace pyproject.toml \
+      --replace '"textx >= 3.0.0, == 3.*"' '"textx"' \
+      --replace '"docutils >= 0.16, == 0.*"' '"docutils"' \
+      --replace '"pygments >= 2.10.0, == 2.*"' '"pygments"' \
+      --replace '"lxml >= 4.6.2, == 4.*"' '"lxml"' \
+      --replace '"beautifulsoup4 >= 4.12.0, == 4.*"' '"beautifulsoup4"' \
+      --replace '"python-datauri >= 0.2.9, == 0.*"' '"python-datauri"' \
+      --replace '"XlsxWriter >= 1.3.7, == 1.*"' '"XlsxWriter"' \
+      --replace '"xlrd >= 2.0.1, == 2.*"' '"xlrd"' \
+      --replace '"reqif >= 0.0.33, == 0.*"' '"reqif"' \
+      --replace '"pybtex >= 0.23.0, == 0.*"' '"pybtex"'
   '';
 
-  nativeBuildInputs = [
-    html5lib
-    invoke
-    openpyxl
-    poetry-core
-    tidylib
+  nativeBuildInputs = with python3.pkgs; [
+    hatchling
   ];
 
-  propagatedBuildInputs = [
+  propagatedBuildInputs = with python3.pkgs; [
     beautifulsoup4
     datauri
     docutils
+    fastapi
+    html5lib
     jinja2
     lxml
     markupsafe
+    pybtex
     pygments
+    python-multipart
     reqif
     setuptools
     textx
+    toml
+    uvicorn
+    websockets
     xlrd
     xlsxwriter
-  ];
+  ] ++ uvicorn.optional-dependencies.standard;
 
-  nativeCheckInputs = [
+  nativeCheckInputs = with python3.pkgs; [
     pytestCheckHook
   ];
 
@@ -86,10 +68,14 @@ buildPythonApplication rec {
     "test_001_load_from_files"
   ];
 
+  disabledTestPaths = [
+    "tests/end2end/"
+  ];
+
   meta = with lib; {
     description = "Software requirements specification tool";
     homepage = "https://github.com/strictdoc-project/strictdoc";
-    changelog = "https://github.com/strictdoc-project/strictdoc/releases";
+    changelog = "https://github.com/strictdoc-project/strictdoc/releases/tag/${version}";
     license = licenses.asl20;
     maintainers = with maintainers; [ yuu ];
   };