56 lines
987 B
Nix
56 lines
987 B
Nix
{
|
|
lib,
|
|
namespace,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
inherit (lib.trivial) importJSON;
|
|
inherit (lib.${namespace}) selectVariant mkAllSources;
|
|
|
|
versionSpec = importJSON ./version.json;
|
|
selected = selectVariant versionSpec null null;
|
|
sources = mkAllSources pkgs selected;
|
|
version = selected.variables.version;
|
|
in
|
|
pkgs.python3Packages.buildPythonPackage {
|
|
pname = "homeassistant_api";
|
|
inherit version;
|
|
format = "pyproject";
|
|
|
|
src = sources.homeassistant_api;
|
|
|
|
doCheck = false;
|
|
|
|
nativeBuildInputs = with pkgs.python3Packages; [
|
|
poetry-core
|
|
requests-cache
|
|
];
|
|
|
|
dependencies = with pkgs.python3Packages; [
|
|
requests-cache
|
|
pydantic
|
|
websockets
|
|
];
|
|
|
|
propagatedBuildInputs = with pkgs.python3Packages; [
|
|
aiohttp
|
|
aiohttp-client-cache
|
|
pydantic
|
|
requests
|
|
requests-cache
|
|
simplejson
|
|
websockets
|
|
];
|
|
|
|
pythonRelaxDeps = [
|
|
"requests-cache"
|
|
"pydantic"
|
|
"websockets"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"homeassistant_api"
|
|
];
|
|
}
|