Files
nixpkgs/pkgs/development/python-modules/frigidaire/default.nix
2026-10-25 11:34:23 +00:00

47 lines
1002 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
requests,
responses,
setuptools,
}:
buildPythonPackage (finalAttrs: {
pname = "frigidaire";
version = "1.0.1";
pyproject = true;
src = fetchFromGitHub {
owner = "bm1549";
repo = "frigidaire";
tag = finalAttrs.version;
hash = "sha256-j2p/vPQ0J25qJkIiBLKZ1pTVRTaTkHmy5A+u9y6MyT8=";
};
postPatch = ''
substituteInPlace setup.py \
--replace-fail 'version = "0.0.0-dev"' 'version = "${finalAttrs.version}"'
'';
build-system = [ setuptools ];
dependencies = [ requests ];
nativeCheckInputs = [
pytestCheckHook
responses
];
pythonImportsCheck = [ "frigidaire" ];
meta = {
description = "Python API for the Frigidaire devices";
homepage = "https://github.com/bm1549/frigidaire";
changelog = "https://github.com/bm1549/frigidaire/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
})