Merge pull request #112403 from fabaff/libpurecool

This commit is contained in:
Sandro 2021-02-08 20:24:58 +01:00 committed by GitHub
commit 872b4b9df1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 50 additions and 1 deletions

View file

@ -0,0 +1,47 @@
{ lib
, buildPythonPackage
, fetchPypi
, netifaces
, paho-mqtt
, pycryptodome
, requests
, six
, zeroconf
}:
buildPythonPackage rec {
pname = "libpurecool";
version = "0.6.4";
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 ];
};
}

View file

@ -195,7 +195,7 @@
"dwd_weather_warnings" = ps: with ps; [ ]; # missing inputs: dwdwfsapi
"dweet" = ps: with ps; [ ]; # missing inputs: dweepy
"dynalite" = ps: with ps; [ ]; # missing inputs: dynalite_devices
"dyson" = ps: with ps; [ aiohttp-cors zeroconf ]; # missing inputs: libpurecool
"dyson" = ps: with ps; [ aiohttp-cors libpurecool zeroconf ];
"eafm" = ps: with ps; [ aioeafm ];
"ebox" = ps: with ps; [ ]; # missing inputs: pyebox
"ebusd" = ps: with ps; [ ]; # missing inputs: ebusdpy

View file

@ -3660,6 +3660,8 @@ in {
inherit python;
})).py;
libpurecool = callPackage ../development/python-modules/libpurecool { };
libredwg = toPythonModule (pkgs.libredwg.override {
enablePython = true;
inherit (self) python libxml2;