btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / al / alpaca / package.nix
blob09974003d4ccd0c491e7b5ced9e4e12be1364055
2   lib,
3   python3Packages,
4   fetchFromGitHub,
5   appstream,
6   meson,
7   ninja,
8   pkg-config,
9   gobject-introspection,
10   wrapGAppsHook4,
11   desktop-file-utils,
12   libadwaita,
13   gtksourceview5,
14   xdg-utils,
15   ollama,
16   vte-gtk4,
19 python3Packages.buildPythonApplication rec {
20   pname = "alpaca";
21   version = "2.7.0";
22   pyproject = false; # Built with meson
24   src = fetchFromGitHub {
25     owner = "Jeffser";
26     repo = "Alpaca";
27     rev = "refs/tags/${version}";
28     hash = "sha256-gEQUVSNf8u92qIg0+5fsLIOPgIASdYdlTRDpzl61P+Q=";
29   };
31   nativeBuildInputs = [
32     appstream
33     meson
34     ninja
35     pkg-config
36     gobject-introspection
37     wrapGAppsHook4
38     desktop-file-utils
39   ];
41   buildInputs = [
42     libadwaita
43     gtksourceview5
44     vte-gtk4
45   ];
47   dependencies = with python3Packages; [
48     pygobject3
49     requests
50     pillow
51     pypdf
52     pytube
53     html2text
54     youtube-transcript-api
55   ];
57   dontWrapGApps = true;
59   makeWrapperArgs = [
60     "\${gappsWrapperArgs[@]}"
61     "--prefix PATH : ${lib.makeBinPath [ xdg-utils ollama ]}"
62     # Declared but not used in src/window.py, for later reference
63     # https://github.com/flatpak/flatpak/issues/3229
64     "--set FLATPAK_DEST ${placeholder "out"}"
65   ];
67   meta = {
68     description = "Ollama client made with GTK4 and Adwaita";
69     longDescription = ''
70       To run Alpaca with GPU acceleration enabled, simply override it:
71       ```nix
72       pkgs.alpaca.override {
73         ollama = pkgs.ollama-cuda;
74       }
75       ```
76       Or using `pkgs.ollama-rocm` for AMD GPUs.
77     '';
78     homepage = "https://jeffser.com/alpaca";
79     license = lib.licenses.gpl3Plus;
80     mainProgram = "alpaca";
81     maintainers = with lib.maintainers; [ aleksana ];
82     platforms = lib.platforms.linux;
83   };