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