about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2023-09-07 13:21:54 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2023-09-08 01:02:50 +0200
commitee9e52a52ea4b1987ea03f7217c3e65b6e616c1c (patch)
treef760fd3e2b3998910b09d8d922a38f7f70844d93
parent5646d24e0c5df907b8797a49f741861dee6ff3bc (diff)
downloadnixlib-ee9e52a52ea4b1987ea03f7217c3e65b6e616c1c.tar
nixlib-ee9e52a52ea4b1987ea03f7217c3e65b6e616c1c.tar.gz
nixlib-ee9e52a52ea4b1987ea03f7217c3e65b6e616c1c.tar.bz2
nixlib-ee9e52a52ea4b1987ea03f7217c3e65b6e616c1c.tar.lz
nixlib-ee9e52a52ea4b1987ea03f7217c3e65b6e616c1c.tar.xz
nixlib-ee9e52a52ea4b1987ea03f7217c3e65b6e616c1c.tar.zst
nixlib-ee9e52a52ea4b1987ea03f7217c3e65b6e616c1c.zip
python311Packages.universal-silabs-flasher: init at 0.0.13
https://github.com/NabuCasa/universal-silabs-flasher
-rw-r--r--pkgs/development/python-modules/universal-silabs-flasher/default.nix73
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 75 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/universal-silabs-flasher/default.nix b/pkgs/development/python-modules/universal-silabs-flasher/default.nix
new file mode 100644
index 000000000000..348fa01ffbe1
--- /dev/null
+++ b/pkgs/development/python-modules/universal-silabs-flasher/default.nix
@@ -0,0 +1,73 @@
+{ lib
+, stdenv
+, buildPythonPackage
+, fetchFromGitHub
+
+# build-system
+, setuptools
+, setuptools-git-versioning
+, wheel
+
+# dependencies
+, async-timeout
+, bellows
+, click
+, coloredlogs
+, crc
+, libgpiod
+, typing-extensions
+, zigpy
+
+# tests
+, pytestCheckHook
+, pytest-asyncio
+, pytest-mock
+, pytest-timeout
+}:
+
+buildPythonPackage rec {
+  pname = "universal-silabs-flasher";
+  version = "0.0.13";
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "NabuCasa";
+    repo = "universal-silabs-flasher";
+    rev = "v${version}";
+    hash = "sha256-qiaDPCnVb6JQ2fZRFK+QF4o8K2UbIWGNKl5oo6MQUW0=";
+  };
+
+  nativeBuildInputs = [
+    setuptools
+    setuptools-git-versioning
+    wheel
+  ];
+
+  propagatedBuildInputs = [
+    async-timeout
+    bellows
+    click
+    coloredlogs
+    crc
+    typing-extensions
+    zigpy
+  ] ++ lib.optionals (stdenv.hostPlatform.isLinux) [
+    libgpiod
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+    pytest-asyncio
+    pytest-mock
+    pytest-timeout
+  ];
+
+  pythonImportsCheck = [ "universal_silabs_flasher" ];
+
+  meta = with lib; {
+    description = "Flashes Silicon Labs radios running EmberZNet or CPC multi-pan firmware";
+    homepage = "https://github.com/NabuCasa/universal-silabs-flasher";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ hexa ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 94b3934988e1..120aa81c96ed 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -13386,6 +13386,8 @@ self: super: with self; {
 
   universal-pathlib = callPackage ../development/python-modules/universal-pathlib { };
 
+  universal-silabs-flasher = callPackage ../development/python-modules/universal-silabs-flasher { };
+
   unpaddedbase64 = callPackage ../development/python-modules/unpaddedbase64 { };
 
   unrardll = callPackage ../development/python-modules/unrardll { };