Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / science / engineering / strictdoc / default.nix
blob54a4e21a3f60e820b9318b37e4d9bf0e6195da5b
1 { lib
2 , fetchFromGitHub
3 , python3
4 }:
6 python3.pkgs.buildPythonApplication rec {
7   pname = "strictdoc";
8   version = "0.0.40";
9   format = "pyproject";
11   src = fetchFromGitHub {
12     owner = "strictdoc-project";
13     repo = pname;
14     rev = "refs/tags/${version}";
15     hash = "sha256-kZ8qVhroSPSGAcgUFZb1vRI6JoFyjeg/0qYosbRnwyc=";
16   };
18   postPatch = ''
19     substituteInPlace pyproject.toml \
20       --replace '"textx >= 3.0.0, == 3.*"' '"textx"' \
21       --replace '"docutils >= 0.16, == 0.*"' '"docutils"' \
22       --replace '"pygments >= 2.10.0, == 2.*"' '"pygments"' \
23       --replace '"lxml >= 4.6.2, == 4.*"' '"lxml"' \
24       --replace '"beautifulsoup4 >= 4.12.0, == 4.*"' '"beautifulsoup4"' \
25       --replace '"python-datauri >= 0.2.9, == 0.*"' '"python-datauri"' \
26       --replace '"XlsxWriter >= 1.3.7, == 1.*"' '"XlsxWriter"' \
27       --replace '"xlrd >= 2.0.1, == 2.*"' '"xlrd"' \
28       --replace '"reqif >= 0.0.33, == 0.*"' '"reqif"' \
29       --replace '"pybtex >= 0.23.0, == 0.*"' '"pybtex"'
30   '';
32   nativeBuildInputs = with python3.pkgs; [
33     hatchling
34   ];
36   propagatedBuildInputs = with python3.pkgs; [
37     beautifulsoup4
38     datauri
39     docutils
40     fastapi
41     html5lib
42     jinja2
43     lxml
44     markupsafe
45     pybtex
46     pygments
47     python-multipart
48     reqif
49     setuptools
50     textx
51     toml
52     uvicorn
53     websockets
54     xlrd
55     xlsxwriter
56   ] ++ uvicorn.optional-dependencies.standard;
58   nativeCheckInputs = with python3.pkgs; [
59     pytestCheckHook
60   ];
62   pythonImportsCheck = [
63     "strictdoc"
64   ];
66   disabledTests = [
67     # fixture 'fs' not found
68     "test_001_load_from_files"
69   ];
71   disabledTestPaths = [
72     "tests/end2end/"
73   ];
75   meta = with lib; {
76     description = "Software requirements specification tool";
77     homepage = "https://github.com/strictdoc-project/strictdoc";
78     changelog = "https://github.com/strictdoc-project/strictdoc/releases/tag/${version}";
79     license = licenses.asl20;
80     maintainers = with maintainers; [ yuu ];
81   };