{ 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; }; }