Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

106 lines
2.0 KiB
Nix
Raw Permalink Normal View History

2024-07-19 21:11:15 +08:00
{
lib,
python3Packages,
fetchFromGitHub,
appstream,
meson,
ninja,
pkg-config,
gobject-introspection,
wrapGAppsHook4,
desktop-file-utils,
libadwaita,
gtksourceview5,
xdg-utils,
ollama,
2024-10-10 07:53:08 +02:00
vte-gtk4,
2025-01-15 23:07:55 +01:00
libspelling,
2025-01-15 23:24:16 +01:00
nix-update-script,
2024-07-19 21:11:15 +08:00
}:
python3Packages.buildPythonApplication rec {
pname = "alpaca";
2025-06-12 12:18:46 +03:00
version = "6.1.7";
2024-07-19 21:11:15 +08:00
pyproject = false; # Built with meson
src = fetchFromGitHub {
owner = "Jeffser";
repo = "Alpaca";
2024-12-29 03:41:58 +01:00
tag = version;
2025-06-12 12:18:46 +03:00
hash = "sha256-9UXaJpkz9F2D490bMKU/xv+rgfrxstm1DuDwpMmydI0=";
2024-07-19 21:11:15 +08:00
};
nativeBuildInputs = [
appstream
meson
ninja
pkg-config
gobject-introspection
wrapGAppsHook4
desktop-file-utils
];
buildInputs = [
libadwaita
gtksourceview5
2024-10-10 07:53:08 +02:00
vte-gtk4
2025-01-15 23:07:55 +01:00
libspelling
2024-07-19 21:11:15 +08:00
];
dependencies = with python3Packages; [
pygobject3
requests
pillow
2024-07-24 19:15:57 +08:00
html2text
2024-11-07 02:47:38 +08:00
youtube-transcript-api
2024-11-25 18:00:56 +01:00
pydbus
2024-12-29 03:41:58 +01:00
odfpy
pyicu
2025-01-15 23:07:55 +01:00
matplotlib
openai
2025-05-29 10:38:49 +08:00
markitdown
2024-07-19 21:11:15 +08:00
];
2025-05-29 10:38:49 +08:00
optional-dependencies = {
speech-to-text = [ python3Packages.openai-whisper ];
};
2024-07-19 21:11:15 +08:00
dontWrapGApps = true;
makeWrapperArgs = [
"\${gappsWrapperArgs[@]}"
"--prefix PATH : ${
lib.makeBinPath [
xdg-utils
ollama
]
}"
# Declared but not used in src/window.py, for later reference
# https://github.com/flatpak/flatpak/issues/3229
"--set FLATPAK_DEST ${placeholder "out"}"
];
2025-01-15 23:24:16 +01:00
passthru.updateScript = nix-update-script { };
2024-07-19 21:11:15 +08:00
meta = {
description = "Ollama client made with GTK4 and Adwaita";
longDescription = ''
To run Alpaca with GPU acceleration enabled, simply override it:
```nix
pkgs.alpaca.override {
ollama = pkgs.ollama-cuda;
}
```
2024-07-24 19:15:57 +08:00
Or using `pkgs.ollama-rocm` for AMD GPUs.
2024-07-19 21:11:15 +08:00
'';
homepage = "https://jeffser.com/alpaca";
license = lib.licenses.gpl3Plus;
mainProgram = "alpaca";
2024-12-29 03:42:26 +01:00
maintainers = with lib.maintainers; [
aleksana
Gliczy
];
platforms = lib.platforms.unix;
2024-07-19 21:11:15 +08:00
};
}