depot/third_party/nixpkgs/pkgs/development/python-modules/frigidaire/default.nix
Default email 87f9c27ba9 Project import generated by Copybara.
GitOrigin-RevId: fe2ecaf706a5907b5e54d979fbde4924d84b65fc
2023-04-12 14:48:02 +02:00

55 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, certifi
, chardet
, fetchFromGitHub
, idna
, pythonOlder
, requests
, urllib3
}:
buildPythonPackage rec {
pname = "frigidaire";
version = "0.18.4";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "bm1549";
repo = pname;
rev = "regs/tags/${version}";
hash = "sha256-U2ixBtigY15RzMNIeUK71uNOndUepK2kE/CTFwl855w=";
};
postPatch = ''
# https://github.com/bm1549/frigidaire/pull/13
substituteInPlace setup.py \
--replace "urllib3>==1.26.42" "urllib3" \
--replace 'version = "SNAPSHOT"' 'version = "${version}"'
'';
propagatedBuildInputs = [
certifi
chardet
idna
requests
urllib3
];
# Project has no tests
doCheck = false;
pythonImportsCheck = [
"frigidaire"
];
meta = with lib; {
description = "Python API for the Frigidaire devices";
homepage = "https://github.com/bm1549/frigidaire";
changelog = "https://github.com/bm1549/frigidaire/releases/tag/${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}