nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 gql,
7 pytest-asyncio,
8 pytestCheckHook,
9 pythonOlder,
10 setuptools,
11 websockets,
12}:
13
14buildPythonPackage (finalAttrs: {
15 pname = "pytibber";
16 version = "0.35.0";
17 pyproject = true;
18
19 disabled = pythonOlder "3.11";
20
21 src = fetchFromGitHub {
22 owner = "Danielhiversen";
23 repo = "pyTibber";
24 tag = finalAttrs.version;
25 hash = "sha256-zipHn6ZLRwRtvTKgJTrTSZwETviwLOPS8rMTRB3fErs=";
26 };
27
28 build-system = [ setuptools ];
29
30 pythonRelaxDeps = [
31 "gql"
32 ];
33
34 dependencies = [
35 aiohttp
36 gql
37 websockets
38 ];
39
40 nativeCheckInputs = [
41 pytest-asyncio
42 pytestCheckHook
43 ];
44
45 disabledTestPaths = [
46 # Tests access network
47 "test/test_tibber.py"
48 ];
49
50 pythonImportsCheck = [ "tibber" ];
51
52 meta = {
53 description = "Python library to communicate with Tibber";
54 homepage = "https://github.com/Danielhiversen/pyTibber";
55 changelog = "https://github.com/Danielhiversen/pyTibber/releases/tag/${finalAttrs.src.tag}";
56 license = lib.licenses.gpl3Plus;
57 maintainers = with lib.maintainers; [ dotlambda ];
58 };
59})