Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, buildPythonPackage
3, python
4, fetchFromGitHub
5, poetry-core
6, beautifulsoup4
7, lxml
8, jinja2
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 pname = "reqif";
14 version = "0.0.8";
15 format = "pyproject";
16
17 src = fetchFromGitHub {
18 owner = "strictdoc-project";
19 repo = pname;
20 rev = version;
21 sha256 = "sha256-PtzRJUvv+Oee08+sdakFviKIhwfLngyal1WSWDtMELg=";
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 pyproject.toml --replace "^" ">="
29 substituteInPlace requirements.txt --replace "==" ">="
30 '';
31
32 nativeBuildInputs = [
33 poetry-core
34 ];
35
36 propagatedBuildInputs = [
37 beautifulsoup4
38 lxml
39 jinja2
40 ];
41
42 pythonImportsCheck = [
43 "reqif"
44 ];
45
46 checkInputs = [
47 pytestCheckHook
48 ];
49
50 meta = with lib; {
51 description = "Python library for ReqIF format";
52 homepage = "https://github.com/strictdoc-project/reqif";
53 license = licenses.asl20;
54 maintainers = with maintainers; [ yuu ];
55 };
56}