diff --git a/pkgs/development/python-modules/co2signal/default.nix b/pkgs/development/python-modules/co2signal/default.nix new file mode 100644 index 000000000000..2c7aeb4ceaeb --- /dev/null +++ b/pkgs/development/python-modules/co2signal/default.nix @@ -0,0 +1,29 @@ +{ lib +, buildPythonPackage +, fetchPypi +, requests +}: + +buildPythonPackage rec { + pname = "co2signal"; + version = "0.4.2"; + + src = fetchPypi { + inherit version; + pname = "CO2Signal"; + hash = "sha256-8YdYbknLICRrZloGUZuscv5e1LIDZBcCPKZs6EMaNuo="; + }; + + propagatedBuildInputs = [ requests ]; + # Modules has no tests + doCheck = false; + + pythonImportsCheck = [ "CO2Signal" ]; + + meta = with lib; { + description = "A package to access the CO2 Signal API "; + homepage = "https://github.com/danielsjf/CO2Signal"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ plabadens ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 2169c5c7b98f..7a325693a0ff 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -135,7 +135,7 @@ "cloud" = ps: with ps; [ pyturbojpeg aiohttp-cors hass-nabucasa ]; "cloudflare" = ps: with ps; [ pycfdns ]; "cmus" = ps: with ps; [ ]; # missing inputs: pycmus - "co2signal" = ps: with ps; [ ]; # missing inputs: co2signal + "co2signal" = ps: with ps; [ co2signal ]; "coinbase" = ps: with ps; [ ]; # missing inputs: coinbase "color_extractor" = ps: with ps; [ colorthief ]; "comed_hourly_pricing" = ps: with ps; [ ]; @@ -1090,6 +1090,7 @@ "climate" "cloud" "cloudflare" + "co2signal" "color_extractor" "comfoconnect" "command_line" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index beb14495df4b..a1bbaeb7205f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1705,6 +1705,8 @@ in { cnvkit = callPackage ../development/python-modules/cnvkit { }; + co2signal = callPackage ../development/python-modules/co2signal { }; + coapthon3 = callPackage ../development/python-modules/coapthon3 { }; coconut = callPackage ../development/python-modules/coconut { };