Files
nixpkgs/pkgs/development/python-modules/libpurecool/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

53 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
netifaces,
paho-mqtt,
pycryptodome,
requests,
six,
zeroconf,
}:
buildPythonPackage rec {
pname = "libpurecool";
version = "0.6.4";
pyproject = true;
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-fail "from .zeroconf import ServiceBrowser, Zeroconf" "from zeroconf import ServiceBrowser, Zeroconf"
'';
build-system = [ setuptools ];
dependencies = [
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 = {
description = "Python library for Dyson devices";
homepage = "http://libpurecool.readthedocs.io";
license = with lib.licenses; [ asl20 ];
maintainers = with lib.maintainers; [ fab ];
};
}