nixpkgs/pkgs/development/python-modules/elmax/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

49 lines
957 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, httpx
, poetry-core
, pythonOlder
, pytest-asyncio
, pytest-httpx
, pytestCheckHook
, yarl
}:
buildPythonPackage rec {
pname = "elmax";
version = "0.1.5";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "home-assistant-ecosystem";
repo = "python-elmax";
rev = version;
hash = "sha256-EcYEpYv+EwwEfW8Sy7aQjFAPpmsA6qVbmlwrPdxdnEw=";
};
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
httpx
yarl
];
nativeCheckInputs = [
pytest-asyncio
pytest-httpx
pytestCheckHook
];
pythonImportsCheck = [ "elmax" ];
meta = with lib; {
description = "Python API client for the Elmax Cloud services";
mainProgram = "poetry-template";
homepage = "https://github.com/home-assistant-ecosystem/python-elmax";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}