nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytest-asyncio,
6 pytestCheckHook,
7 setuptools,
8 zigpy,
9}:
10
11buildPythonPackage rec {
12 pname = "zigpy-xbee";
13 version = "0.21.1";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "zigpy";
18 repo = "zigpy-xbee";
19 tag = version;
20 hash = "sha256-ALwhl9WUDkv0POufF/G/rZrn+ITbMdh6y86lShy6ZTg=";
21 };
22
23 postPatch = ''
24 substituteInPlace pyproject.toml \
25 --replace-fail ', "setuptools-git-versioning<2"' "" \
26 --replace-fail 'dynamic = ["version"]' 'version = "${version}"'
27 '';
28
29 build-system = [ setuptools ];
30
31 dependencies = [
32 zigpy
33 ];
34
35 nativeCheckInputs = [
36 pytest-asyncio
37 pytestCheckHook
38 ];
39
40 meta = {
41 changelog = "https://github.com/zigpy/zigpy-xbee/releases/tag/${version}";
42 description = "Library which communicates with XBee radios for zigpy";
43 homepage = "https://github.com/zigpy/zigpy-xbee";
44 license = lib.licenses.gpl3Plus;
45 maintainers = with lib.maintainers; [ mvnetbiz ];
46 platforms = lib.platforms.linux;
47 };
48}