1{ lib
2, buildPythonPackage
3, click
4, fetchFromGitHub
5, mock
6, pytestCheckHook
7, requests
8, pythonOlder
9, websocket-client
10}:
11
12buildPythonPackage rec {
13 pname = "waterfurnace";
14 version = "1.1.0";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "sdague";
21 repo = pname;
22 rev = "refs/tags/v${version}";
23 sha256 = "1ba247fw1fvi7zy31zj2wbjq7fajrbxhp139cl9jj67rfvxfv8xf";
24 };
25
26 postPatch = ''
27 substituteInPlace setup.py \
28 --replace "'pytest-runner'," ""
29 '';
30
31 propagatedBuildInputs = [
32 click
33 requests
34 websocket-client
35 ];
36
37 nativeCheckInputs = [
38 mock
39 pytestCheckHook
40 ];
41
42 pythonImportsCheck = [
43 "waterfurnace"
44 ];
45
46 meta = with lib; {
47 description = "Python interface to waterfurnace geothermal systems";
48 homepage = "https://github.com/sdague/waterfurnace";
49 changelog = "https://github.com/sdague/waterfurnace/blob/v${version}/HISTORY.rst";
50 license = with licenses; [ asl20 ];
51 maintainers = with maintainers; [ fab ];
52 };
53}