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 2fadf242b7a3..000000000000 --- 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 aaf944fdd01e..54a4e21a3f60 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 ]; };