mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-25 14:24:40 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
91 lines
1.7 KiB
Nix
91 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
python3Packages,
|
|
fetchFromGitHub,
|
|
appstream,
|
|
meson,
|
|
ninja,
|
|
pkg-config,
|
|
gobject-introspection,
|
|
wrapGAppsHook4,
|
|
desktop-file-utils,
|
|
libadwaita,
|
|
gtksourceview5,
|
|
xdg-utils,
|
|
ollama,
|
|
vte-gtk4,
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "alpaca";
|
|
version = "2.9.0";
|
|
pyproject = false; # Built with meson
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Jeffser";
|
|
repo = "Alpaca";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-ionioPA69haDIyXjqU84nuTNtI32jOnhd6oCTRI6vcA=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
appstream
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
gobject-introspection
|
|
wrapGAppsHook4
|
|
desktop-file-utils
|
|
];
|
|
|
|
buildInputs = [
|
|
libadwaita
|
|
gtksourceview5
|
|
vte-gtk4
|
|
];
|
|
|
|
dependencies = with python3Packages; [
|
|
pygobject3
|
|
requests
|
|
pillow
|
|
pypdf
|
|
pytube
|
|
html2text
|
|
youtube-transcript-api
|
|
pydbus
|
|
];
|
|
|
|
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;
|
|
}
|
|
```
|
|
Or using `pkgs.ollama-rocm` for AMD GPUs.
|
|
'';
|
|
homepage = "https://jeffser.com/alpaca";
|
|
license = lib.licenses.gpl3Plus;
|
|
mainProgram = "alpaca";
|
|
maintainers = with lib.maintainers; [ aleksana ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|