2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
certifi,
|
|
|
|
chardet,
|
|
|
|
fetchFromGitHub,
|
|
|
|
idna,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
setuptools,
|
|
|
|
urllib3,
|
2021-10-04 12:37:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "frigidaire";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.18.23";
|
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-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-RzwTQRo5cIh6I8VQAJNcLg5TBiF6dAnZICGfvwCvx5Y=";
|
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-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-02-07 01:22:34 +00:00
|
|
|
|
2021-10-04 12:37:57 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
certifi
|
|
|
|
chardet
|
|
|
|
idna
|
|
|
|
requests
|
|
|
|
urllib3
|
|
|
|
];
|
|
|
|
|
|
|
|
# Project has no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +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 ];
|
|
|
|
};
|
|
|
|
}
|