1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 flit-core,
7 aiohttp,
8 pytz,
9 requests,
10 pytestCheckHook,
11 pytest-asyncio,
12 pytest-cov-stub,
13 pydantic,
14 responses,
15}:
16
17buildPythonPackage rec {
18 pname = "fhir-py";
19 version = "2.1.0";
20 pyproject = true;
21
22 disabled = pythonOlder "3.8";
23
24 src = fetchFromGitHub {
25 owner = "beda-software";
26 repo = "fhir-py";
27 tag = "v${version}";
28 hash = "sha256-ffaDWo/6xQwpMjiOCx3JIGtSHUjwcEilInD/YN73ZMI=";
29 };
30
31 build-system = [ flit-core ];
32
33 dependencies = [
34 aiohttp
35 pytz
36 requests
37 ];
38
39 nativeCheckInputs = [
40 pytestCheckHook
41 pytest-asyncio
42 pytest-cov-stub
43 pydantic
44 responses
45 ];
46
47 # sync/async test cases require docker-compose to set up services, so disable:
48 disabledTestPaths = [ "tests/test_lib_sync.py" ];
49 disabledTests = [ "TestLibAsyncCase" ];
50
51 pythonImportsCheck = [ "fhirpy" ];
52
53 meta = with lib; {
54 description = "Async/sync API for FHIR resources";
55 homepage = "https://github.com/beda-software/fhir-py";
56 changelog = "https://github.com/beda-software/fhir-py/blob/${src.tag}/CHANGELOG.md";
57 license = licenses.mit;
58 maintainers = with maintainers; [ bcdarwin ];
59 };
60}