depot/third_party/nixpkgs/pkgs/development/python-modules/frigidaire/default.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

53 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, certifi
, chardet
, fetchFromGitHub
, idna
, pythonOlder
, requests
, urllib3
}:
buildPythonPackage rec {
pname = "frigidaire";
version = "0.18.12";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "bm1549";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-U6ko6P5/ANGy84GQDuSQq+YArou0TrXH5SIc5x4euvU=";
};
postPatch = ''
substituteInPlace setup.py \
--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 ];
};
}