nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8
9 # docs
10 sphinx-rtd-theme,
11 sphinxHook,
12
13 # dependencies
14 colorzero,
15
16 # tests
17 pytestCheckHook,
18 pytest-cov-stub,
19}:
20
21buildPythonPackage rec {
22 pname = "gpiozero";
23 version = "2.0.1";
24 pyproject = true;
25
26 src = fetchFromGitHub {
27 owner = "gpiozero";
28 repo = "gpiozero";
29 tag = "v${version}";
30 hash = "sha256-ifdCFcMH6SrhKQK/TJJ5lJafSfAUzd6ZT5ANUzJGwxI=";
31 };
32
33 outputs = [
34 "out"
35 "doc"
36 ];
37
38 nativeBuildInputs = [
39 setuptools
40 sphinx-rtd-theme
41 sphinxHook
42 ];
43
44 propagatedBuildInputs = [ colorzero ];
45
46 nativeCheckInputs = [
47 pytestCheckHook
48 pytest-cov-stub
49 ];
50
51 pythonImportsCheck = [
52 "gpiozero"
53 "gpiozero.tools"
54 ];
55
56 disabledTests = [
57 # https://github.com/gpiozero/gpiozero/issues/1087
58 "test_spi_hardware_write"
59 ];
60
61 meta = {
62 description = "Simple interface to GPIO devices with Raspberry Pi";
63 homepage = "https://github.com/gpiozero/gpiozero";
64 changelog = "https://github.com/gpiozero/gpiozero/blob/v${version}/docs/changelog.rst";
65 license = lib.licenses.bsd3;
66 platforms = lib.platforms.linux;
67 maintainers = with lib.maintainers; [ hexa ];
68 };
69}