2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
flit-core,
|
|
|
|
aiohttp,
|
|
|
|
pytz,
|
|
|
|
requests,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-asyncio,
|
2024-09-19 14:19:46 +00:00
|
|
|
pytest-cov-stub,
|
|
|
|
pydantic,
|
2024-06-05 15:53:02 +00:00
|
|
|
responses,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fhir-py";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "2.0.4";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "beda-software";
|
|
|
|
repo = "fhir-py";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-WDYDQqeNwt4cKEgF+HqMOuEwUezS10YUOZp+eAui6nM=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [ flit-core ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
dependencies = [
|
2024-01-02 11:29:13 +00:00
|
|
|
aiohttp
|
|
|
|
pytz
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-asyncio
|
2024-09-19 14:19:46 +00:00
|
|
|
pytest-cov-stub
|
|
|
|
pydantic
|
2024-01-02 11:29:13 +00:00
|
|
|
responses
|
|
|
|
];
|
|
|
|
|
|
|
|
# sync/async test cases require docker-compose to set up services, so disable:
|
|
|
|
disabledTestPaths = [ "tests/test_lib_sync.py" ];
|
|
|
|
disabledTests = [ "TestLibAsyncCase" ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "fhirpy" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Async/sync API for FHIR resources";
|
|
|
|
homepage = "https://github.com/beda-software/fhir-py";
|
|
|
|
changelog = "https://github.com/beda-software/fhir-py/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|