nixpkgs/pkgs/development/python-modules/idasen/default.nix
2022-03-31 09:39:24 +02:00

59 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, bleak
, pyyaml
, voluptuous
, pytestCheckHook
, pytest-asyncio
, poetry-core
}:
buildPythonPackage rec {
pname = "idasen";
version = "0.8.2";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "newAM";
repo = "idasen";
rev = "v${version}";
hash = "sha256-s8CnYMUVl2VbGbVxICSaKH5DxTA+NP/zPX1z7vfMqi4=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
bleak
pyyaml
voluptuous
];
checkInputs = [
pytestCheckHook
pytest-asyncio
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'voluptuous = "^0.12"' 'voluptuous = "*"'
'';
pythonImportsCheck = [
"idasen"
];
meta = with lib; {
description = "Python API and CLI for the ikea IDÅSEN desk";
homepage = "https://github.com/newAM/idasen";
changelog = "https://github.com/newAM/idasen/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ newam ];
};
}