nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 aiohttp,
4 aresponses,
5 buildPythonPackage,
6 certifi,
7 fetchFromGitHub,
8 poetry-core,
9 pytest-aiohttp,
10 pytest-asyncio,
11 pytestCheckHook,
12 yarl,
13}:
14
15buildPythonPackage rec {
16 pname = "aiowatttime";
17 version = "2024.06.0";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "bachya";
22 repo = "aiowatttime";
23 tag = version;
24 hash = "sha256-c5L+Nx+CoWEc6Bs61GOHPBelExe5I7EOlMQ+QV6nktI=";
25 };
26
27 nativeBuildInputs = [ poetry-core ];
28
29 propagatedBuildInputs = [
30 aiohttp
31 certifi
32 yarl
33 ];
34
35 __darwinAllowLocalNetworking = true;
36
37 nativeCheckInputs = [
38 aresponses
39 pytest-aiohttp
40 pytest-asyncio
41 pytestCheckHook
42 ];
43
44 # Ignore the examples directory as the files are prefixed with test_
45 disabledTestPaths = [ "examples/" ];
46
47 pythonImportsCheck = [ "aiowatttime" ];
48
49 meta = {
50 description = "Python library for interacting with WattTime";
51 homepage = "https://github.com/bachya/aiowatttime";
52 license = with lib.licenses; [ mit ];
53 maintainers = with lib.maintainers; [ fab ];
54 };
55}