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-08-22 20:05:09 +00:00
|
|
|
version = "1.0.2";
|
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-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-DfC92gqPP9Lky4gX2v8/AbZgM7uRCKjRQC2nS/sDHsY=";
|
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;
|
|
|
|
};
|
|
|
|
}
|