1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, setuptools
6, unasync
7, boto3
8, botocore
9, requests
10, aiohttp
11, pyquery
12, loguru
13}:
14
15buildPythonPackage rec {
16 pname = "pyhiveapi";
17 version = "0.5.15";
18
19 format = "pyproject";
20
21 disabled = pythonOlder "3.6";
22
23 src = fetchFromGitHub {
24 owner = "Pyhass";
25 repo = "Pyhiveapi";
26 rev = "refs/tags/v${version}";
27 hash = "sha256-tR2PCR1qGn4KnqAjEpcRTcVlMEpKCwn5RAm99AXBSnk=";
28 };
29
30 postPatch = ''
31 substituteInPlace requirements.txt \
32 --replace "pre-commit" ""
33 '';
34
35 nativeBuildInputs = [
36 setuptools
37 unasync
38 ];
39
40 propagatedBuildInputs = [
41 boto3
42 botocore
43 requests
44 aiohttp
45 pyquery
46 loguru
47 ];
48
49 # tests are not functional yet
50 doCheck = false;
51
52 postBuild = ''
53 # pyhiveapi accesses $HOME upon importing
54 export HOME=$TMPDIR
55 '';
56
57 pythonImportsCheck = [ "pyhiveapi" ];
58
59 meta = with lib; {
60 description = "Python library to interface with the Hive API";
61 homepage = "https://github.com/Pyhass/Pyhiveapi";
62 license = licenses.mit;
63 maintainers = with maintainers; [ dotlambda ];
64 };
65}