Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.busylight-for-humans: init at 0.32.0 #307469

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions pkgs/development/python-modules/bitvector-for-humans/default.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}
67 changes: 67 additions & 0 deletions pkgs/development/python-modules/busylight-for-humans/default.nix
Original file line number Diff line number Diff line change
@@ -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.";
Conni2461 marked this conversation as resolved.
Show resolved Hide resolved
mainProgram = "busylight";
license = licenses.asl20;
maintainers = teams.helsinki-systems.members;
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,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 { };
Expand Down Expand Up @@ -1869,6 +1871,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 { };
Expand Down