nixos-configs/scopedPackages/hass-components/extended-ollama-conversation/default.nix
matt1432 838df34dfb
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: rename legacyPackages to scopedPackages
2024-11-20 15:17:55 -05:00

27 lines
682 B
Nix

{
extended-ollama-conversation-src,
buildHomeAssistantComponent,
python3Packages,
...
}: let
inherit (builtins) fromJSON readFile;
manifest = fromJSON (readFile "${extended-ollama-conversation-src}/custom_components/extended_ollama_conversation/manifest.json");
in
buildHomeAssistantComponent {
owner = "TheNimaj";
inherit (manifest) domain version;
src = extended-ollama-conversation-src;
prePatch = ''
substituteInPlace ./custom_components/extended_ollama_conversation/manifest.json \
--replace-warn "openai~=1.3.8" "openai>=1.3.8"
'';
propagatedBuildInputs = with python3Packages; [
ollama
openai
];
}