1{ 2 lib, 3 libgpiod, 4 buildPythonPackage, 5 fetchFromGitHub, 6}: 7 8buildPythonPackage rec { 9 pname = "rpi-gpio2"; 10 version = "0.4.0"; 11 format = "setuptools"; 12 13 # PyPi source does not work for some reason 14 src = fetchFromGitHub { 15 owner = "underground-software"; 16 repo = "RPi.GPIO2"; 17 rev = "refs/tags/v${version}"; 18 hash = "sha256-CNnej67yTh3C8n4cCA7NW97rlfIDrrlepRNDkv+BUeY="; 19 }; 20 21 propagatedBuildInputs = [ libgpiod ]; 22 23 # Disable checks because they need to run on the specific platform 24 doCheck = false; 25 26 meta = with lib; { 27 homepage = "https://github.com/underground-software/RPi.GPIO2"; 28 description = '' 29 Compatibility layer between RPi.GPIO syntax and libgpiod semantics 30 ''; 31 license = licenses.gpl3Plus; 32 maintainers = with maintainers; [ onny ]; 33 }; 34}