Merge pull request #307469 from helsinki-systems/init/busylight

python312Packages.busylight-for-humans: init at 0.32.0
This commit is contained in:
0x4A6F 2024-07-22 14:32:21 +02:00 committed by GitHub
commit af81d1b24b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 112 additions and 0 deletions

View File

@ -0,0 +1,41 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch2,
poetry-core,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "bitvector-for-humans";
version = "0.14.1";
pyproject = true;
src = fetchFromGitHub {
owner = "JnyJny";
repo = "bitvector";
rev = version;
hash = "sha256-GVTRD83tq/Hea53US4drOD5ruoYCLTVd24aZOSdDsSo=";
};
patches = [
(fetchpatch2 {
# https://github.com/JnyJny/bitvector/pull/1
name = "fix-poetry-core.patch";
url = "https://github.com/JnyJny/bitvector/commit/e5777f2425895ed854e54bed2ed9d993f6feaf2f.patch";
hash = "sha256-BG3IpDMys88RtkPOd58CWpRWKKzbNe5kV+64hWjtecE=";
})
];
build-system = [ poetry-core ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "bitvector" ];
meta = with lib; {
homepage = "https://github.com/JnyJny/bitvector";
description = "This simple bit vector implementation aims to make addressing single bits a little less fiddly.";
license = licenses.asl20;
maintainers = teams.helsinki-systems.members;
};
}

View File

@ -0,0 +1,67 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch2,
poetry-core,
pytestCheckHook,
pytest-mock,
bitvector-for-humans,
hidapi,
loguru,
pyserial,
typer,
webcolors,
}:
buildPythonPackage rec {
pname = "busylight-for-humans";
version = "0.32.0";
pyproject = true;
src = fetchFromGitHub {
owner = "JnyJny";
repo = "busylight";
rev = version;
hash = "sha256-rdgkTk9x3bO5H01Bo2yOGIIxkoLv1k7kkJidJu/1HDQ=";
};
patches = [
(fetchpatch2 {
# https://github.com/JnyJny/busylight/pull/369
name = "fix-poetry-core.patch";
url = "https://github.com/helsinki-systems/busylight/commit/74ca283e2250564f422d904ece1b9ab0dd9a8f6c.patch";
hash = "sha256-eif9ycSYL8ZpXsvNCOHDJlpj12oauyzlMKUScZMzllc=";
})
];
build-system = [ poetry-core ];
dependencies = [
bitvector-for-humans
hidapi
loguru
pyserial
typer
webcolors
];
nativeCheckInputs = [
pytestCheckHook
pytest-mock
];
disabledTestPaths = [ "tests/test_pydantic_models.py" ];
pythonImportsCheck = [ "busylight" ];
postInstall = ''
mkdir -p $out/lib/udev/rules.d
$out/bin/busylight udev-rules -o $out/lib/udev/rules.d/99-busylight.rules
'';
meta = with lib; {
homepage = "https://github.com/JnyJny/busylight";
description = "Control USB connected presence lights from multiple vendors via the command-line or web API.";
mainProgram = "busylight";
license = licenses.asl20;
maintainers = teams.helsinki-systems.members;
};
}

View File

@ -1622,6 +1622,8 @@ self: super: with self; {
bitvavo-aio = callPackage ../development/python-modules/bitvavo-aio { };
bitvector-for-humans = callPackage ../development/python-modules/bitvector-for-humans { };
bizkaibus = callPackage ../development/python-modules/bizkaibus { };
bjoern = callPackage ../development/python-modules/bjoern { };
@ -1881,6 +1883,8 @@ self: super: with self; {
bundlewrap-teamvault = callPackage ../development/python-modules/bundlewrap-teamvault { };
busylight-for-humans = callPackage ../development/python-modules/busylight-for-humans { };
busypie = callPackage ../development/python-modules/busypie { };
bx-py-utils = callPackage ../development/python-modules/bx-py-utils { };