2021-10-17 09:34:42 +00:00
|
|
|
{ lib
|
2023-02-02 18:25:31 +00:00
|
|
|
, async-timeout
|
2021-10-17 09:34:42 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, webcolors
|
|
|
|
, pythonOlder
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "flux-led";
|
2023-03-30 22:05:00 +00:00
|
|
|
version = "0.28.36";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
2021-10-17 09:34:42 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Danielhiversen";
|
|
|
|
repo = "flux_led";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-03-30 22:05:00 +00:00
|
|
|
hash = "sha256-UoWeVLsfc8rK3U7zaF8bKXk/XdrgT6F3biNe/UFq/rE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-02-02 18:25:31 +00:00
|
|
|
async-timeout
|
2021-10-17 09:34:42 +00:00
|
|
|
webcolors
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-10-17 09:34:42 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '"pytest-runner>=5.2",' ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"flux_led"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-10-17 09:34:42 +00:00
|
|
|
description = "Python library to communicate with the flux_led smart bulbs";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/Danielhiversen/flux_led";
|
2022-11-21 17:40:18 +00:00
|
|
|
changelog = "https://github.com/Danielhiversen/flux_led/releases/tag/${version}";
|
2021-10-17 09:34:42 +00:00
|
|
|
license = licenses.lgpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ colemickens ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|