summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2021-11-22 09:45:05 +0100
committerGitHub <noreply@github.com>2021-11-22 09:45:05 +0100
commit5de7043867727a727bb7c08742a9da4bf737372e (patch)
tree657dbf581fe1cd2942125c94721dc02670279a3b /pkgs
parentebc27a10a0d42e1b20df0c7a2efb0ed7a7f3cef7 (diff)
parent373eb080dc2703de2051b38d1ca6f3f01304a3cb (diff)
downloadnixpkgs-5de7043867727a727bb7c08742a9da4bf737372e.tar
nixpkgs-5de7043867727a727bb7c08742a9da4bf737372e.tar.gz
nixpkgs-5de7043867727a727bb7c08742a9da4bf737372e.tar.bz2
nixpkgs-5de7043867727a727bb7c08742a9da4bf737372e.tar.lz
nixpkgs-5de7043867727a727bb7c08742a9da4bf737372e.tar.xz
nixpkgs-5de7043867727a727bb7c08742a9da4bf737372e.tar.zst
nixpkgs-5de7043867727a727bb7c08742a9da4bf737372e.zip
Merge pull request #146897 from fabaff/afsapi
python3Packages.afsapi: init at 0.0.4
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/afsapi/default.nix49
-rw-r--r--pkgs/servers/home-assistant/component-packages.nix2
-rw-r--r--pkgs/top-level/python-packages.nix2
3 files changed, 52 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/afsapi/default.nix b/pkgs/development/python-modules/afsapi/default.nix
new file mode 100644
index 00000000000..8ad6fa98ff6
--- /dev/null
+++ b/pkgs/development/python-modules/afsapi/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, aiohttp
+, buildPythonPackage
+, fetchFromGitHub
+, lxml
+, pytest-aiohttp
+, pytestCheckHook
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "afsapi";
+  version = "0.0.4";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.8";
+
+  src = fetchFromGitHub {
+    owner = "zhelev";
+    repo = "python-afsapi";
+    rev = version;
+    sha256 = "aevxhHuRedDs0JxeMlYSKHDQwcIs7miRm4FCtssdE0w=";
+  };
+
+  propagatedBuildInputs = [
+    aiohttp
+    lxml
+  ];
+
+  checkInputs = [
+    pytest-aiohttp
+    pytestCheckHook
+  ];
+
+  pytestFlagsArray = [
+    "async_tests.py"
+  ];
+
+  pythonImportsCheck = [
+    "afsapi"
+  ];
+
+  meta = with lib; {
+    description = "Python implementation of the Frontier Silicon API";
+    homepage = "https://github.com/zhelev/python-afsapi";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix
index 934d8c22ae6..a5526e92015 100644
--- a/pkgs/servers/home-assistant/component-packages.nix
+++ b/pkgs/servers/home-assistant/component-packages.nix
@@ -298,7 +298,7 @@
     "fritzbox_callmonitor" = ps: with ps; [ fritzconnection ];
     "fronius" = ps: with ps; [ pyfronius ];
     "frontend" = ps: with ps; [ aiohttp-cors home-assistant-frontend pillow sqlalchemy ];
-    "frontier_silicon" = ps: with ps; [ ]; # missing inputs: afsapi
+    "frontier_silicon" = ps: with ps; [ afsapi ];
     "futurenow" = ps: with ps; [ pyfnip ];
     "garadget" = ps: with ps; [ ];
     "garages_amsterdam" = ps: with ps; [ garages-amsterdam ];
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index fb2f39bf8c3..c8f81db0614 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -221,6 +221,8 @@ in {
 
   affine = callPackage ../development/python-modules/affine { };
 
+  afsapi = callPackage ../development/python-modules/afsapi { };
+
   agate = callPackage ../development/python-modules/agate { };
 
   agate-dbf = callPackage ../development/python-modules/agate-dbf { };