depot/third_party/nixpkgs/pkgs/development/python-modules/flux-led/default.nix
Default email b450903751 Project import generated by Copybara.
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
2022-09-09 16:08:57 +02:00

51 lines
981 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, webcolors
, pythonOlder
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "flux-led";
version = "0.28.32";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Danielhiversen";
repo = "flux_led";
rev = "refs/tags/${version}";
sha256 = "sha256-YZ0ox04xakpazOIAERM2EO5c4PzmaSwYWULSjp0MJbw=";
};
propagatedBuildInputs = [
webcolors
];
checkInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.py \
--replace '"pytest-runner>=5.2",' ""
'';
pytestFlagsArray = [
"tests.py"
];
pythonImportsCheck = [
"flux_led"
];
meta = with lib; {
description = "Python library to communicate with the flux_led smart bulbs";
homepage = "https://github.com/Danielhiversen/flux_led";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ colemickens ];
platforms = platforms.linux;
};
}