2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
beautifulsoup4,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
hatchling,
|
|
|
|
jinja2,
|
|
|
|
lxml,
|
|
|
|
pytestCheckHook,
|
|
|
|
python,
|
|
|
|
pythonOlder,
|
|
|
|
pythonRelaxDepsHook,
|
|
|
|
xmlschema,
|
2022-07-18 16:21:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "reqif";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.0.42";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2022-07-18 16:21:45 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "strictdoc-project";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "reqif";
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-cQhis7jrcly3cw2LRv7hpPBFAB0Uag69czf+wJvbh/Q=";
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2024-02-29 20:09:43 +00:00
|
|
|
substituteInPlace ./tests/unit/conftest.py \
|
|
|
|
--replace-fail "os.path.abspath(os.path.join(__file__, \"../../../../reqif\"))" \
|
2022-08-12 12:06:08 +00:00
|
|
|
"\"${placeholder "out"}/${python.sitePackages}/reqif\""
|
2022-07-18 16:21:45 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-03-15 16:39:30 +00:00
|
|
|
hatchling
|
2024-02-29 20:09:43 +00:00
|
|
|
pythonRelaxDepsHook
|
2022-07-18 16:21:45 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
beautifulsoup4
|
|
|
|
lxml
|
|
|
|
jinja2
|
2024-02-29 20:09:43 +00:00
|
|
|
xmlschema
|
2022-07-18 16:21:45 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-07-18 16:21:45 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "reqif" ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for ReqIF format";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "reqif";
|
2022-07-18 16:21:45 +00:00
|
|
|
homepage = "https://github.com/strictdoc-project/reqif";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/strictdoc-project/reqif/releases/tag/${version}";
|
2022-07-18 16:21:45 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ yuu ];
|
|
|
|
};
|
|
|
|
}
|