From 8f48d8850620f0505e336f0ea7eb813039ffee18 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 1 Jan 2021 22:39:59 +0100 Subject: [PATCH] python3Packages.opensensemap-api: init at 0.1.5 --- .../opensensemap-api/default.nix | 37 +++++++++++++++++++ .../home-assistant/component-packages.nix | 2 +- pkgs/top-level/python-packages.nix | 2 + 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/opensensemap-api/default.nix diff --git a/pkgs/development/python-modules/opensensemap-api/default.nix b/pkgs/development/python-modules/opensensemap-api/default.nix new file mode 100644 index 000000000000..d9f4cb6b1add --- /dev/null +++ b/pkgs/development/python-modules/opensensemap-api/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, aiohttp +, async-timeout +}: + +buildPythonPackage rec { + pname = "opensensemap-api"; + version = "0.1.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "1f3iqwl8ynvrkdd961v2hjsbldwbr217pv5pay2m5f0m974bhblx"; + }; + + propagatedBuildInputs = [ + aiohttp + async-timeout + ]; + + # no tests are present + doCheck = false; + + pythonImportsCheck = [ "opensensemap_api" ]; + + meta = with lib; { + description = "OpenSenseMap API Python client"; + longDescription = '' + Python Client for interacting with the openSenseMap API. All + available information from the sensor can be retrieved. + ''; + homepage = "https://github.com/home-assistant-ecosystem/python-opensensemap-api"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 93595c5729f1..8f35ffe5c160 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -586,7 +586,7 @@ "opengarage" = ps: with ps; [ ]; # missing inputs: open-garage "openhardwaremonitor" = ps: with ps; [ ]; "openhome" = ps: with ps; [ ]; # missing inputs: openhomedevice - "opensensemap" = ps: with ps; [ ]; # missing inputs: opensensemap-api + "opensensemap" = ps: with ps; [ opensensemap-api ]; "opensky" = ps: with ps; [ ]; "opentherm_gw" = ps: with ps; [ ]; # missing inputs: pyotgw "openuv" = ps: with ps; [ ]; # missing inputs: pyopenuv diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 57458230bb11..fd9f96836563 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4359,6 +4359,8 @@ in { openrouteservice = callPackage ../development/python-modules/openrouteservice/default.nix { }; + opensensemap-api = callPackage ../development/python-modules/opensensemap-api { }; + opentimestamps = callPackage ../development/python-modules/opentimestamps { }; opentracing = callPackage ../development/python-modules/opentracing { };