diff --git a/pkgs/development/python-modules/microsoft-kiota-abstractions/default.nix b/pkgs/development/python-modules/microsoft-kiota-abstractions/default.nix new file mode 100644 index 000000000000..c8927fb8d108 --- /dev/null +++ b/pkgs/development/python-modules/microsoft-kiota-abstractions/default.nix @@ -0,0 +1,55 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, flit-core +, opentelemetry-api +, opentelemetry-sdk +, pytest-asyncio +, pytest-mock +, pytestCheckHook +, pythonOlder +, std-uritemplate +}: + +buildPythonPackage rec { + pname = "microsoft-kiota-abstractions"; + version = "1.2.0"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "microsoft"; + repo = "kiota-abstractions-python"; + rev = "refs/tags/v${version}"; + hash = "sha256-ubDbpQhrqoyiBNne15nlO44lXg2wG+wrL8EJasMUocc="; + }; + + nativeBuildInputs = [ + flit-core + ]; + + propagatedBuildInputs = [ + opentelemetry-api + opentelemetry-sdk + std-uritemplate + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytest-mock + pytestCheckHook + ]; + + pythonImportsCheck = [ + "kiota_abstractions" + ]; + + meta = with lib; { + description = "Abstractions library for Kiota generated Python clients"; + homepage = "https://github.com/microsoft/kiota-abstractions-python"; + changelog = "https://github.com/microsoft/kiota-abstractions-python/blob/${version}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/microsoft-kiota-authentication-azure/default.nix b/pkgs/development/python-modules/microsoft-kiota-authentication-azure/default.nix new file mode 100644 index 000000000000..5526fab6ceae --- /dev/null +++ b/pkgs/development/python-modules/microsoft-kiota-authentication-azure/default.nix @@ -0,0 +1,59 @@ +{ lib +, aiohttp +, azure-core +, buildPythonPackage +, fetchFromGitHub +, flit-core +, microsoft-kiota-abstractions +, opentelemetry-api +, opentelemetry-sdk +, pytest-asyncio +, pytest-mock +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "microsoft-kiota-authentication-azure"; + version = "1.0.0"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "microsoft"; + repo = "kiota-authentication-azure-python"; + rev = "refs/tags/v${version}"; + hash = "sha256-RA0BbIwDs3cXiH4tQsvCGUO1OAg+DWjEeWd7MEVIC8E="; + }; + + nativeBuildInputs = [ + flit-core + ]; + + propagatedBuildInputs = [ + aiohttp + azure-core + microsoft-kiota-abstractions + opentelemetry-api + opentelemetry-sdk + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytest-mock + pytestCheckHook + ]; + + pythonImportsCheck = [ + "kiota_authentication_azure" + ]; + + meta = with lib; { + description = "Kiota Azure authentication provider"; + homepage = "https://github.com/microsoft/kiota-authentication-azure-python"; + changelog = "https://github.com/microsoft/kiota-authentication-azure-python/blob/${version}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/microsoft-kiota-http/default.nix b/pkgs/development/python-modules/microsoft-kiota-http/default.nix new file mode 100644 index 000000000000..111bbc8302d6 --- /dev/null +++ b/pkgs/development/python-modules/microsoft-kiota-http/default.nix @@ -0,0 +1,59 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, flit-core +, httpx +, microsoft-kiota-abstractions +, opentelemetry-api +, opentelemetry-sdk +, pytest-asyncio +, pytest-mock +, pytestCheckHook +, pythonOlder +, urllib3 +}: + +buildPythonPackage rec { + pname = "microsoft-kiota-http"; + version = "1.3.0"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "microsoft"; + repo = "kiota-http-python"; + rev = "refs/tags/v${version}"; + hash = "sha256-N3+oAH3yWgrl0v2fm4xdCxzj7u/0fbQI3xHFht39vzA="; + }; + + nativeBuildInputs = [ + flit-core + ]; + + propagatedBuildInputs = [ + httpx + microsoft-kiota-abstractions + opentelemetry-api + opentelemetry-sdk + ] ++ httpx.optional-dependencies.http2; + + nativeCheckInputs = [ + pytest-asyncio + pytest-mock + pytestCheckHook + urllib3 + ]; + + pythonImportsCheck = [ + "kiota_http" + ]; + + meta = with lib; { + description = "HTTP request adapter implementation for Kiota clients for Python"; + homepage = "https://github.com/microsoft/kiota-http-python"; + changelog = "https://github.com/microsoft/kiota-http-python/blob/${version}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/microsoft-kiota-serialization-json/default.nix b/pkgs/development/python-modules/microsoft-kiota-serialization-json/default.nix new file mode 100644 index 000000000000..40840436fa01 --- /dev/null +++ b/pkgs/development/python-modules/microsoft-kiota-serialization-json/default.nix @@ -0,0 +1,58 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, flit-core +, microsoft-kiota-abstractions +, pendulum +, pytest-asyncio +, pytest-mock +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "kiota-serialization-json"; + version = "1.0.0"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "microsoft"; + repo = "kiota-serialization-json-python"; + rev = "refs/tags/v${version}"; + hash = "sha256-DhuDIRTm6xATnXpQ+xLpMuaBcWxZHdr8dO1Rl8OvCKQ="; + }; + + nativeBuildInputs = [ + flit-core + ]; + + propagatedBuildInputs = [ + microsoft-kiota-abstractions + pendulum + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytest-mock + pytestCheckHook + ]; + + pythonImportsCheck = [ + "kiota_serialization_json" + ]; + + disabledTests = [ + # Test compare an output format + "test_parse_union_type_complex_property1" + ]; + + meta = with lib; { + description = "JSON serialization implementation for Kiota clients in Python"; + homepage = "https://github.com/microsoft/kiota-serialization-json-python"; + changelog = "https://github.com/microsoft/kiota-serialization-json-python/blob/${version}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/microsoft-kiota-serialization-text/default.nix b/pkgs/development/python-modules/microsoft-kiota-serialization-text/default.nix new file mode 100644 index 000000000000..64e00d477875 --- /dev/null +++ b/pkgs/development/python-modules/microsoft-kiota-serialization-text/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, flit-core +, microsoft-kiota-abstractions +, pytest-asyncio +, pytest-mock +, pytestCheckHook +, python-dateutil +, pythonOlder +}: + +buildPythonPackage rec { + pname = "kiota-serialization-text"; + version = "1.0.0"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "microsoft"; + repo = "kiota-serialization-text-python"; + rev = "refs/tags/v${version}"; + hash = "sha256-jPuRfvqO4n5/PjSOS5NMCawaYRhXmrZtfg6LgYFCv7o="; + }; + + nativeBuildInputs = [ + flit-core + ]; + + propagatedBuildInputs = [ + microsoft-kiota-abstractions + python-dateutil + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytest-mock + pytestCheckHook + ]; + + pythonImportsCheck = [ + "kiota_serialization_text" + ]; + + meta = with lib; { + description = "Text serialization implementation for Kiota generated clients in Python"; + homepage = "https://github.com/microsoft/kiota-serialization-text-python"; + changelog = "https://github.com/microsoft/kiota-serialization-text-python/blob/${version}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b340aa474648..17466cf80ae3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7180,6 +7180,16 @@ self: super: with self; { microdata = callPackage ../development/python-modules/microdata { }; + microsoft-kiota-abstractions = callPackage ../development/python-modules/microsoft-kiota-abstractions { }; + + microsoft-kiota-authentication-azure = callPackage ../development/python-modules/microsoft-kiota-authentication-azure { }; + + microsoft-kiota-http = callPackage ../development/python-modules/microsoft-kiota-http { }; + + microsoft-kiota-serialization-json = callPackage ../development/python-modules/microsoft-kiota-serialization-json { }; + + microsoft-kiota-serialization-text = callPackage ../development/python-modules/microsoft-kiota-serialization-text { }; + midiutil = callPackage ../development/python-modules/midiutil { }; mido = callPackage ../development/python-modules/mido { };