diff --git a/flake.lock b/flake.lock index 5216e6f..484e95d 100644 --- a/flake.lock +++ b/flake.lock @@ -446,11 +446,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1762596750, - "narHash": "sha256-rXXuz51Bq7DHBlfIjN7jO8Bu3du5TV+3DSADBX7/9YQ=", + "lastModified": 1762977756, + "narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b6a8526db03f735b89dd5ff348f53f752e7ddc8e", + "rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55", "type": "github" }, "original": { @@ -474,11 +474,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1762756533, - "narHash": "sha256-HiRDeUOD1VLklHeOmaKDzf+8Hb7vSWPVFcWwaTrpm+U=", + "lastModified": 1763049705, + "narHash": "sha256-A5LS0AJZ1yDPTa2fHxufZN++n8MCmtgrJDtxFxrH4S8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c2448301fb856e351aab33e64c33a3fc8bcf637d", + "rev": "3acb677ea67d4c6218f33de0db0955f116b7588c", "type": "github" }, "original": { @@ -585,11 +585,11 @@ ] }, "locked": { - "lastModified": 1762812535, - "narHash": "sha256-A91a+K0Q9wfdPLwL06e/kbHeAWSzPYy2EGdTDsyfb+s=", + "lastModified": 1763264763, + "narHash": "sha256-N0BEoJIlJ+M6sWZJ8nnfAjGY9VLvM6MXMitRenmhBkY=", "owner": "Mic92", "repo": "sops-nix", - "rev": "d75e4f89e58fdda39e4809f8c52013caa22483b7", + "rev": "882e56c8293e44d57d882b800a82f8b2ee7a858f", "type": "github" }, "original": { diff --git a/pkgs/rpi-ws281x-python/default.nix b/pkgs/rpi-ws281x-python/default.nix new file mode 100644 index 0000000..c6e9917 --- /dev/null +++ b/pkgs/rpi-ws281x-python/default.nix @@ -0,0 +1,43 @@ +{ + lib, + python3, + fetchFromGitHub, + pkgs, +}: +python3.pkgs.buildPythonPackage rec { + pname = "rpi-ws281x"; + version = "5.0.0"; + + src = fetchFromGitHub { + owner = "rpi-ws281x"; + repo = "rpi-ws281x-pytho"; + rev = "v${version}"; + sha256 = "sha256-tnjvFDBa+sNX6dK6/I1/rRt62k15kTP+9J8eyFRFs/I="; + fetchSubmodules = true; + deepClone = true; + }; + + # sourceRoot = "${src}/library"; + + format = "setuptools"; + + propagatedBuildInputs = with python3.pkgs; [ + setuptools + wheel + ]; + + postUnpack = '' + sourceRoot="$sourceRoot/library" + ''; + + # Some of the bindings compile C code, so you may need these + nativeBuildInputs = [python3.pkgs.setuptools pkgs.scons]; + + meta = with lib; { + description = "Python bindings for the rpi_ws281x C library"; + homepage = "https://github.com/rpi-ws281x/rpi-ws281x-python"; + license = licenses.mit; + maintainers = []; + platforms = platforms.linux; + }; +}