nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 80 lines 1.6 kB view raw
1{ 2 lib, 3 bitvector-for-humans, 4 buildPythonPackage, 5 busylight-core, 6 fastapi, 7 fetchFromGitHub, 8 hatchling, 9 hidapi, 10 httpx, 11 loguru, 12 pyserial, 13 pytest-mock, 14 pytestCheckHook, 15 typer, 16 udevCheckHook, 17 uvicorn, 18 webcolors, 19}: 20 21buildPythonPackage rec { 22 pname = "busylight-for-humans"; 23 version = "0.45.3"; 24 pyproject = true; 25 26 src = fetchFromGitHub { 27 owner = "JnyJny"; 28 repo = "busylight"; 29 tag = "v${version}"; 30 hash = "sha256-EP+2jWOrXQE8sZQYclMMbpfr+FmPHIbZ35NNbfCTnUk="; 31 }; 32 33 build-system = [ hatchling ]; 34 35 dependencies = [ 36 bitvector-for-humans 37 busylight-core 38 hidapi 39 loguru 40 pyserial 41 typer 42 webcolors 43 ]; 44 45 optional-dependencies = { 46 webapi = [ 47 fastapi 48 uvicorn 49 ]; 50 }; 51 52 nativeCheckInputs = [ 53 httpx 54 pytestCheckHook 55 pytest-mock 56 udevCheckHook 57 ] 58 ++ lib.concatAttrValues optional-dependencies; 59 60 disabledTestPaths = [ "tests/test_pydantic_models.py" ]; 61 62 pythonImportsCheck = [ "busylight" ]; 63 64 postInstall = '' 65 mkdir -p $out/lib/udev/rules.d 66 $out/bin/busylight udev-rules -o $out/lib/udev/rules.d/99-busylight.rules 67 ''; 68 69 meta = { 70 description = "Control USB connected presence lights from multiple vendors via the command-line or web API"; 71 homepage = "https://github.com/JnyJny/busylight"; 72 changelog = "https://github.com/JnyJny/busylight/releases/tag/${src.tag}"; 73 license = lib.licenses.asl20; 74 maintainers = with lib.maintainers; [ 75 das_j 76 helsinki-Jo 77 ]; 78 mainProgram = "busylight"; 79 }; 80}