From 702f6e3ce4d1632700fc3fdc03c5699ef720c6c1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 1 Nov 2024 20:00:23 +0100 Subject: [PATCH 1/2] python312Packages.sensoterra: init at 2.0.1 Query Sensoterra probes using the Customer API https://pypi.org/project/sensoterra/ --- .../python-modules/sensoterra/default.nix | 38 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/python-modules/sensoterra/default.nix diff --git a/pkgs/development/python-modules/sensoterra/default.nix b/pkgs/development/python-modules/sensoterra/default.nix new file mode 100644 index 0000000000000..a592bd652fc30 --- /dev/null +++ b/pkgs/development/python-modules/sensoterra/default.nix @@ -0,0 +1,38 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + pythonOlder, + requests, + setuptools, +}: + +buildPythonPackage rec { + pname = "sensoterra"; + version = "2.0.1"; + pyproject = true; + + disabled = pythonOlder "3.11"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-WfjTOns5OPU8+ufDeFdDGjURhBWUFfw/qRSHQazBL04="; + }; + + build-system = [ setuptools ]; + + dependencies = [ requests ]; + + # Test require network access + doCheck = false; + + pythonImportsCheck = [ "sensoterra" ]; + + meta = { + description = "Query Sensoterra probes using the Customer API"; + homepage = "https://gitlab.com/sensoterra/public/python"; + changelog = "https://gitlab.com/sensoterra/public/python/-/blob/main/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f201fad95c5f1..d9dac75cb9251 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14217,6 +14217,8 @@ self: super: with self; { sensorpush-ble = callPackage ../development/python-modules/sensorpush-ble { }; + sensoterra = callPackage ../development/python-modules/sensoterra { }; + sentencepiece = callPackage ../development/python-modules/sentencepiece { inherit (pkgs) sentencepiece; }; From 37c20e81270e52e9b62a3422fc22a7e891033294 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 1 Nov 2024 20:12:58 +0100 Subject: [PATCH 2/2] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index c6a244127429d..e56fd3d365d71 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -3824,7 +3824,8 @@ zeroconf ]; "sensoterra" = ps: with ps; [ - ]; # missing inputs: sensoterra + sensoterra + ]; "sentry" = ps: with ps; [ sentry-sdk ]; @@ -5652,6 +5653,7 @@ "sensor" "sensorpro" "sensorpush" + "sensoterra" "sentry" "senz" "seventeentrack"