about summary refs log tree commit diff
path: root/pkgs/by-name/pr/private-gpt/package.nix
blob: 1b717cc2bfb83920bc6981b568adabfd868c43e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{ python3Packages
, makeBinaryWrapper
}:

python3Packages.toPythonApplication (python3Packages.private-gpt.overrideAttrs (oldAttrs: {
  nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ makeBinaryWrapper ];

  passthru.cl100k_base = {
    inherit (python3Packages.private-gpt.cl100k_base) tiktoken;
  };

  postInstall = ''
    makeWrapper ${python3Packages.python.interpreter} $out/bin/private-gpt \
      --prefix PYTHONPATH : "$PYTHONPATH" \
      --add-flags "-m private_gpt"
  '';
}))