mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-25 18:10:37 +00:00
prek is a Git hook manager, similar to pre-commit. It's not needed for running the tests. Having prek as a dependency of rf-protocol causes prek to have >1000 reverse dependencies via home-assistant, which is undesirable as this requires each prek update to go through a staging cycle, see e.g. [1]. `$out` stays the same after this change, minus store path differences. [1] https://github.com/NixOS/nixpkgs/pull/539683
49 lines
1.1 KiB
Nix
49 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pyprojectVersionPatchHook,
|
|
pytest-asyncio,
|
|
pytestCheckHook,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "rf-protocols";
|
|
version = "4.3.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "home-assistant-libs";
|
|
repo = "rf-protocols";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-g2e+iQXBaoGO1Yv5v+xpiM+beecErI58Ua5/FODg8Bo=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail "setuptools>=78.1.1,<83.0" setuptools
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
nativeBuildInputs = [
|
|
pyprojectVersionPatchHook
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "rf_protocols" ];
|
|
|
|
meta = {
|
|
description = "Library to decode and encode radio frequency signals";
|
|
homepage = "https://github.com/home-assistant-libs/rf-protocols";
|
|
changelog = "https://github.com/home-assistant-libs/rf-protocols/releases/tag/${finalAttrs.src.tag}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
};
|
|
})
|