From 9fc5ce8ec5f75705ae36cfac7739360367d0df29 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Fri, 8 Dec 2023 13:40:48 -0500 Subject: [PATCH] python311Packages.fhir-py: init at 1.4.2 --- .../python-modules/fhir-py/default.nix | 63 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 65 insertions(+) create mode 100644 pkgs/development/python-modules/fhir-py/default.nix diff --git a/pkgs/development/python-modules/fhir-py/default.nix b/pkgs/development/python-modules/fhir-py/default.nix new file mode 100644 index 000000000000..e4072aaf4633 --- /dev/null +++ b/pkgs/development/python-modules/fhir-py/default.nix @@ -0,0 +1,63 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, flit-core +, aiohttp +, pytz +, requests +, pytestCheckHook +, pytest-asyncio +, responses +}: + +buildPythonPackage rec { + pname = "fhir-py"; + version = "1.4.2"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "beda-software"; + repo = "fhir-py"; + rev = "refs/tags/v${version}"; + hash = "sha256-kYqoRso1ypN5novRxMMzz1h2NGNybbw5lK4+HErG79I="; + }; + + preBuild = '' + substituteInPlace pyproject.toml \ + --replace "--cov=fhirpy" "" \ + --replace "--cov-report=xml" "" + ''; + + nativeBuildInputs = [ + flit-core + ]; + + propagatedBuildInputs = [ + aiohttp + pytz + requests + ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-asyncio + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 426de38c0db1..32e64b2568a8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3930,6 +3930,8 @@ self: super: with self; { ffmpy = callPackage ../development/python-modules/ffmpy { }; + fhir-py = callPackage ../development/python-modules/fhir-py { }; + fiblary3-fork = callPackage ../development/python-modules/fiblary3-fork { }; fido2 = callPackage ../development/python-modules/fido2 { };