diff --git a/pkgs/development/python-modules/airly/default.nix b/pkgs/development/python-modules/airly/default.nix new file mode 100644 index 00000000000..e75653fb684 --- /dev/null +++ b/pkgs/development/python-modules/airly/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, aiohttp +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "airly"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "ak-ambi"; + repo = "python-airly"; + rev = "v${version}"; + sha256 = "0an6nbl0i5pahxm6x4z03s9apzgqrw9zf7srjcs0r3y1ppicb4s6"; + }; + + propagatedBuildInputs = [ aiohttp ]; + + checkInputs = [ pytestCheckHook ]; + + disabledTests = [ + "InstallationsLoaderTestCase" + "MeasurementsSessionTestCase" + ]; + pythonImportsCheck = [ "airly" ]; + + meta = with lib; { + description = "Python module for getting air quality data from Airly sensors"; + homepage = "https://github.com/ak-ambi/python-airly"; + 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 5429fa79925..4e7f4ff5d0c 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -15,7 +15,7 @@ "aftership" = ps: with ps; [ pyaftership ]; "agent_dvr" = ps: with ps; [ ]; # missing inputs: agent-py "air_quality" = ps: with ps; [ ]; - "airly" = ps: with ps; [ ]; # missing inputs: airly + "airly" = ps: with ps; [ airly ]; "airvisual" = ps: with ps; [ pyairvisual ]; "aladdin_connect" = ps: with ps; [ ]; # missing inputs: aladdin_connect "alarm_control_panel" = ps: with ps; [ ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f95cdb6d59c..d9778b141e2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -273,6 +273,8 @@ in { aiozeroconf = callPackage ../development/python-modules/aiozeroconf { }; + airly = callPackage ../development/python-modules/airly { }; + ajpy = callPackage ../development/python-modules/ajpy { }; alabaster = callPackage ../development/python-modules/alabaster { };