-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
/
default.nix
48 lines (42 loc) · 1.09 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{ lib
, buildPythonPackage
, fetchPypi
, netifaces
, paho-mqtt
, pycryptodome
, requests
, six
, zeroconf
}:
buildPythonPackage rec {
pname = "libpurecool";
version = "0.6.4";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "1kwbinbg0i4fca1bpx6jwa1fiw71vg0xa89jhq4pmnl5cn9c8kqx";
};
# Remove vendorized zeroconf, https://github.com/etheralm/libpurecool/issues/33
postPatch = ''
rm libpurecool/zeroconf.py
substituteInPlace libpurecool/dyson_pure_cool_link.py \
--replace "from .zeroconf import ServiceBrowser, Zeroconf" "from zeroconf import ServiceBrowser, Zeroconf"
'';
propagatedBuildInputs = [
netifaces
paho-mqtt
pycryptodome
requests
six
zeroconf
];
# Tests are only present in repo, https://github.com/etheralm/libpurecool/issues/36
doCheck = false;
pythonImportsCheck = [ "libpurecool" ];
meta = with lib; {
description = "Python library for Dyson devices";
homepage = "http://libpurecool.readthedocs.io";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}