1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, sphinx-rtd-theme
5, sphinxHook
6, colorzero
7, mock
8, pytestCheckHook
9}:
10
11buildPythonPackage rec {
12 pname = "gpiozero";
13 version = "1.6.2";
14 format = "setuptools";
15
16 src = fetchFromGitHub {
17 owner = "gpiozero";
18 repo = pname;
19 rev = "refs/tags/v${version}";
20 hash = "sha256-dmFc3DNTlEajYQ5e8QK2WfehwYwAsWyG2cxKg5ykEaI=";
21 };
22
23 outputs = [
24 "out"
25 "doc"
26 ];
27
28 nativeBuildInputs = [
29 sphinx-rtd-theme
30 sphinxHook
31 ];
32
33 propagatedBuildInputs = [
34 colorzero
35 ];
36
37 pythonImportsCheck = [
38 "gpiozero"
39 "gpiozero.tools"
40 ];
41
42 nativeCheckInputs = [
43 mock
44 pytestCheckHook
45 ];
46
47
48 meta = with lib; {
49 description = "A simple interface to GPIO devices with Raspberry Pi";
50 homepage = "https://github.com/gpiozero/gpiozero";
51 license = licenses.bsd3;
52 platforms = platforms.linux;
53 maintainers = with maintainers; [ hexa ];
54 };
55}