2021-10-04 12:37:57 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, certifi
|
|
|
|
, chardet
|
|
|
|
, fetchFromGitHub
|
|
|
|
, idna
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
2024-02-07 01:22:34 +00:00
|
|
|
, setuptools
|
2021-10-04 12:37:57 +00:00
|
|
|
, urllib3
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "frigidaire";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.18.16";
|
2024-02-07 01:22:34 +00:00
|
|
|
pyproject = true;
|
2021-10-04 12:37:57 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bm1549";
|
2024-02-07 01:22:34 +00:00
|
|
|
repo = "frigidaire";
|
2023-04-29 16:46:19 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-PQrQM9AuudDmmsmMcZJjBm+rLA/juDgr3+SORuVurqQ=";
|
2021-10-04 12:37:57 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2024-02-07 01:22:34 +00:00
|
|
|
--replace-warn 'version = "SNAPSHOT"' 'version = "${version}"'
|
2023-04-12 12:48:02 +00:00
|
|
|
'';
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-10-04 12:37:57 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
certifi
|
|
|
|
chardet
|
|
|
|
idna
|
|
|
|
requests
|
|
|
|
urllib3
|
|
|
|
];
|
|
|
|
|
|
|
|
# Project has no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"frigidaire"
|
|
|
|
];
|
2021-10-04 12:37:57 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python API for the Frigidaire devices";
|
|
|
|
homepage = "https://github.com/bm1549/frigidaire";
|
2023-04-12 12:48:02 +00:00
|
|
|
changelog = "https://github.com/bm1549/frigidaire/releases/tag/${version}";
|
2021-10-04 12:37:57 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|