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