5e7c2d6cef
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
73 lines
1.3 KiB
Nix
73 lines
1.3 KiB
Nix
{ 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.14";
|
|
format = "pyproject";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "NabuCasa";
|
|
repo = "universal-silabs-flasher";
|
|
rev = "v${version}";
|
|
hash = "sha256-0c9b571gJXFOAe5ct8O/qy7D6rDosmBHDYEv6odLQ2s=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|