nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 aiohttp,
7 semver,
8 deepmerge,
9 jmespath,
10 pytest-asyncio,
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "blebox-uniapi";
16 version = "2.5.0";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "blebox";
21 repo = "blebox_uniapi";
22 tag = "v${version}";
23 hash = "sha256-johTs1AGvC6mGasK87ijhBNbHb1m36Ep9TR8XPG35d0=";
24 };
25
26 postPatch = ''
27 substituteInPlace setup.py \
28 --replace-fail "pytest-runner" ""
29 '';
30
31 nativeBuildInputs = [ setuptools ];
32
33 propagatedBuildInputs = [
34 aiohttp
35 jmespath
36 semver
37 ];
38
39 nativeCheckInputs = [
40 deepmerge
41 pytest-asyncio
42 pytestCheckHook
43 ];
44
45 pythonImportsCheck = [ "blebox_uniapi" ];
46
47 meta = {
48 changelog = "https://github.com/blebox/blebox_uniapi/blob/v${version}/HISTORY.rst";
49 description = "Python API for accessing BleBox smart home devices";
50 homepage = "https://github.com/blebox/blebox_uniapi";
51 license = lib.licenses.asl20;
52 maintainers = with lib.maintainers; [ dotlambda ];
53 };
54}