2022-08-08 00:12:46 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-02-19 01:19:18 +01:00
|
|
|
pythonOlder,
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
setuptools,
|
|
|
|
|
|
|
|
# docs
|
2022-08-08 00:12:46 +02:00
|
|
|
sphinx-rtd-theme,
|
|
|
|
sphinxHook,
|
2024-02-19 01:19:18 +01:00
|
|
|
|
|
|
|
# dependencies
|
2022-08-08 00:12:46 +02:00
|
|
|
colorzero,
|
2024-02-19 01:19:18 +01:00
|
|
|
|
|
|
|
# tests
|
2022-08-08 00:12:46 +02:00
|
|
|
pytestCheckHook,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gpiozero";
|
2024-02-19 01:19:18 +01:00
|
|
|
version = "2.0.1";
|
|
|
|
pyproject = true;
|
2022-08-08 00:12:46 +02:00
|
|
|
|
2023-10-05 09:21:08 +02:00
|
|
|
disabled = pythonOlder "3.9";
|
2023-08-23 12:40:49 +02:00
|
|
|
|
2022-08-08 00:12:46 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gpiozero";
|
2025-05-25 03:41:48 +02:00
|
|
|
repo = "gpiozero";
|
2025-01-03 21:24:13 +01:00
|
|
|
tag = "v${version}";
|
2024-02-19 01:19:18 +01:00
|
|
|
hash = "sha256-ifdCFcMH6SrhKQK/TJJ5lJafSfAUzd6ZT5ANUzJGwxI=";
|
2022-08-08 00:12:46 +02:00
|
|
|
};
|
|
|
|
|
2023-10-04 03:44:44 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace " --cov" ""
|
|
|
|
'';
|
|
|
|
|
2022-08-08 00:12:46 +02:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"doc"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-02-19 01:19:18 +01:00
|
|
|
setuptools
|
2022-08-08 00:12:46 +02:00
|
|
|
sphinx-rtd-theme
|
|
|
|
sphinxHook
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ colorzero ];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-08-08 00:12:46 +02:00
|
|
|
|
2023-08-23 12:40:49 +02:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"gpiozero"
|
|
|
|
"gpiozero.tools"
|
|
|
|
];
|
|
|
|
|
2023-08-23 12:45:55 +02:00
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/gpiozero/gpiozero/issues/1087
|
|
|
|
"test_spi_hardware_write"
|
|
|
|
];
|
|
|
|
|
2022-08-08 00:12:46 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple interface to GPIO devices with Raspberry Pi";
|
|
|
|
homepage = "https://github.com/gpiozero/gpiozero";
|
2023-08-23 12:38:42 +02:00
|
|
|
changelog = "https://github.com/gpiozero/gpiozero/blob/v${version}/docs/changelog.rst";
|
2022-08-08 00:12:46 +02:00
|
|
|
license = licenses.bsd3;
|
2022-11-07 02:17:12 +01:00
|
|
|
platforms = platforms.linux;
|
2022-08-08 00:12:46 +02:00
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|