diff --git a/pkgs/development/python-modules/zenoh/default.nix b/pkgs/development/python-modules/zenoh/default.nix new file mode 100644 index 0000000000000..cacc31f4e45ab --- /dev/null +++ b/pkgs/development/python-modules/zenoh/default.nix @@ -0,0 +1,51 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + cargo, + rustPlatform, + rustc, + stdenv, + darwin, +}: + +buildPythonPackage rec { + pname = "zenoh"; + version = "1.0.3"; + pyproject = true; + + src = fetchFromGitHub { + owner = "eclipse-zenoh"; + repo = "zenoh-python"; + rev = version; + hash = "sha256-LQ6zu0yD2heprN2p6zO/ZC6uIsMlc1FyDuZ/dvOnVqU="; + }; + + cargoDeps = rustPlatform.fetchCargoVendor { + inherit src pname version; + hash = "sha256-6a2OSZLn1OYpe4tAv60uBhh/b+3QewPxVtQIDOnpk3A="; + }; + + build-system = [ + cargo + rustPlatform.cargoSetupHook + rustPlatform.maturinBuildHook + rustc + ]; + + buildInputs = lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + + pythonImportsCheck = [ + "zenoh" + ]; + + meta = { + description = "Python API for zenoh"; + homepage = "https://github.com/eclipse-zenoh/zenoh-python"; + license = with lib.licenses; [ + asl20 + epl20 + ]; + maintainers = with lib.maintainers; [ markuskowa ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index caa3cb5763e67..c1682fcddad15 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -18298,6 +18298,8 @@ self: super: with self; { python3 = python; })).py; + zenoh = callPackage ../development/python-modules/zenoh { }; + zephyr-python-api = callPackage ../development/python-modules/zephyr-python-api { }; zeroc-ice = callPackage ../development/python-modules/zeroc-ice { };