alpaca: ship on moby; fix cross

This commit is contained in:
2025-07-24 07:29:43 +00:00
parent 32946c35d9
commit 11ada7d35d
2 changed files with 24 additions and 2 deletions

View File

@@ -1,14 +1,36 @@
# alpaca: ollama llm client
# - super simple, easy UI
#
# shortcomings (as of 6.1.7, 2025-07-23):
# - doesn't seem to do any prompt tuning;
# inherits all the pathologies of the underlying model (e.g. makes up citations)
#
# it creates a config dir, `~/.config/com.jeffser.Alpaca`, but apparently empty
#
# TODO: configure ollama connection details statically
{ ... }:
# TODO: update the nix package 6.1.7 -> 7.5.2
# - i.e. review <https://github.com/NixOS/nixpkgs/pull/420698>
{ pkgs, ... }:
{
sane.programs.alpaca = {
packageUnwrapped = (pkgs.alpaca.override {
# ollama is only added to `PATH`; since i'm using it via http, remove it here.
# fixes cross compilation & simplifies closure.
ollama = null;
python3Packages = pkgs.python3Packages // {
# XXX(2025-07-23): does not cross compile (markitdown -> pydub -> ... -> opencv)
markitdown = null;
};
}).overrideAttrs (upstream: {
postPatch = (upstream.postPatch or "") + ''
# for nulled dependencies (above), patch so the application only errors
# at runtime, on first attempted use.
substituteInPlace src/widgets/attachments.py \
--replace-fail 'from markitdown' '# from markitdown'
'';
});
buildCost = 2; #< liable to break cross during updates; not important enough to block deploy over
sandbox.net = "all"; # maybe only needs wireguard, actually
sandbox.whitelistWayland = true;
sandbox.mesaCacheDir = ".cache/com.jeffser.Alpaca/mesa";

View File

@@ -303,6 +303,7 @@ in
guiBaseApps = declPackageSet [
# "abaddon" # discord client
"alacritty" # terminal emulator
"alpaca" # ollama/LLM client
"blanket" # ambient noise generator
"calls" # gnome calls (dialer/handler)
"confy" # conference planning app
@@ -402,7 +403,6 @@ in
"pcGameApps"
"pcTuiApps"
####
"alpaca" # ollama/LLM client
"audacity"
"brave" # for the integrated wallet -- as a backup
# "cantata" # music player (mpd frontend)