about summary refs log tree commit diff
path: root/pkgs/development/python-modules/afsapi
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-11-21 17:43:11 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2021-11-21 17:47:28 +0100
commit71de64a139f3ab2090ff4186fb01b2f859d34cc3 (patch)
tree9433ce6b45b454785917f887ae1087200d9d49c1 /pkgs/development/python-modules/afsapi
parent293e6f0ce5e0db0cbc7ba783c0b3ff31293f3d8f (diff)
python3Packages.afsapi: init at 0.0.4
Diffstat (limited to 'pkgs/development/python-modules/afsapi')
-rw-r--r--pkgs/development/python-modules/afsapi/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/afsapi/default.nix b/pkgs/development/python-modules/afsapi/default.nix
new file mode 100644
index 0000000000000..8ad6fa98ff6e9
--- /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 ];
+  };
+}