nixpkgs/pkgs/development/python-modules/pytradfri/default.nix
Martin Weinelt 272430c823
treewide: migrate python packages to optional-dependencies
This follows the term used by PEP 621.
2022-05-22 16:31:53 +02:00

47 lines
899 B
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, aiocoap
, dtlssocket
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pytradfri";
version = "9.0.0";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "home-assistant-libs";
repo = "pytradfri";
rev = version;
hash = "sha256-12ol+2CnoPfkxmDGJJAkoafHGpQuWC4lh0N7lSvx2DE=";
};
passthru.optional-dependencies = {
async = [
aiocoap
dtlssocket
];
};
checkInputs = [
pytestCheckHook
]
++ passthru.optional-dependencies.async;
pythonImportsCheck = [
"pytradfri"
];
meta = with lib; {
description = "Python package to communicate with the IKEA Trådfri ZigBee Gateway";
homepage = "https://github.com/home-assistant-libs/pytradfri";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}