mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 08:04:14 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
74 lines
1.3 KiB
Nix
74 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pythonOlder,
|
|
|
|
# build-system
|
|
setuptools,
|
|
|
|
# docs
|
|
sphinx-rtd-theme,
|
|
sphinxHook,
|
|
|
|
# dependencies
|
|
colorzero,
|
|
|
|
# tests
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "gpiozero";
|
|
version = "2.0.1";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "gpiozero";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-ifdCFcMH6SrhKQK/TJJ5lJafSfAUzd6ZT5ANUzJGwxI=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.cfg \
|
|
--replace " --cov" ""
|
|
'';
|
|
|
|
outputs = [
|
|
"out"
|
|
"doc"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
sphinx-rtd-theme
|
|
sphinxHook
|
|
];
|
|
|
|
propagatedBuildInputs = [ colorzero ];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [
|
|
"gpiozero"
|
|
"gpiozero.tools"
|
|
];
|
|
|
|
disabledTests = [
|
|
# https://github.com/gpiozero/gpiozero/issues/1087
|
|
"test_spi_hardware_write"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Simple interface to GPIO devices with Raspberry Pi";
|
|
homepage = "https://github.com/gpiozero/gpiozero";
|
|
changelog = "https://github.com/gpiozero/gpiozero/blob/v${version}/docs/changelog.rst";
|
|
license = licenses.bsd3;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ hexa ];
|
|
};
|
|
}
|