nixpkgs/pkgs/by-name/al/alpaca/package.nix

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

86 lines
1.7 KiB
Nix
Raw Normal View History

2024-07-19 13:11:15 +00:00
{
lib,
python3Packages,
fetchFromGitHub,
appstream,
meson,
ninja,
pkg-config,
gobject-introspection,
wrapGAppsHook4,
desktop-file-utils,
libadwaita,
gtksourceview5,
xdg-utils,
ollama,
2024-10-10 05:53:08 +00:00
vte-gtk4,
2024-07-19 13:11:15 +00:00
}:
python3Packages.buildPythonApplication rec {
pname = "alpaca";
2024-11-29 03:19:43 +00:00
version = "2.9.0";
2024-07-19 13:11:15 +00:00
pyproject = false; # Built with meson
src = fetchFromGitHub {
owner = "Jeffser";
repo = "Alpaca";
2024-09-28 10:45:25 +00:00
rev = "refs/tags/${version}";
2024-11-29 03:19:43 +00:00
hash = "sha256-ionioPA69haDIyXjqU84nuTNtI32jOnhd6oCTRI6vcA=";
2024-07-19 13:11:15 +00:00
};
nativeBuildInputs = [
appstream
meson
ninja
pkg-config
gobject-introspection
wrapGAppsHook4
desktop-file-utils
];
buildInputs = [
libadwaita
gtksourceview5
2024-10-10 05:53:08 +00:00
vte-gtk4
2024-07-19 13:11:15 +00:00
];
dependencies = with python3Packages; [
pygobject3
requests
pillow
pypdf
2024-07-24 11:15:57 +00:00
pytube
html2text
2024-11-06 18:47:38 +00:00
youtube-transcript-api
2024-11-25 17:00:56 +00:00
pydbus
2024-07-19 13:11:15 +00: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"}"
];
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 11:15:57 +00:00
Or using `pkgs.ollama-rocm` for AMD GPUs.
2024-07-19 13:11:15 +00:00
'';
homepage = "https://jeffser.com/alpaca";
license = lib.licenses.gpl3Plus;
mainProgram = "alpaca";
maintainers = with lib.maintainers; [ aleksana ];
platforms = lib.platforms.linux;
};
}