1{ lib
2, buildPythonPackage
3, python
4, fetchFromGitHub
5, hatchling
6, beautifulsoup4
7, lxml
8, jinja2
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 pname = "reqif";
14 version = "0.0.27";
15 format = "pyproject";
16
17 src = fetchFromGitHub {
18 owner = "strictdoc-project";
19 repo = pname;
20 rev = "refs/tags/${version}";
21 hash = "sha256-K+su1fhXf/fzL+AI/me2imCNI9aWMcv9Qo1dDRNypso=";
22 };
23
24 postPatch = ''
25 substituteInPlace ./tests/unit/conftest.py --replace \
26 "os.path.abspath(os.path.join(__file__, \"../../../../reqif\"))" \
27 "\"${placeholder "out"}/${python.sitePackages}/reqif\""
28 substituteInPlace requirements.txt --replace "==" ">="
29 '';
30
31 nativeBuildInputs = [
32 hatchling
33 ];
34
35 propagatedBuildInputs = [
36 beautifulsoup4
37 lxml
38 jinja2
39 ];
40
41 pythonImportsCheck = [
42 "reqif"
43 ];
44
45 nativeCheckInputs = [
46 pytestCheckHook
47 ];
48
49 meta = with lib; {
50 description = "Python library for ReqIF format";
51 homepage = "https://github.com/strictdoc-project/reqif";
52 license = licenses.asl20;
53 maintainers = with maintainers; [ yuu ];
54 };
55}