llama-cpp: add bash completion
for the "llama-server" executable
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
autoAddDriverRunpath,
|
||||
cmake,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
nix-update-script,
|
||||
stdenv,
|
||||
|
||||
@@ -89,6 +90,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
installShellFiles
|
||||
ninja
|
||||
pkg-config
|
||||
]
|
||||
@@ -151,6 +153,10 @@ effectiveStdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
mkdir -p $out/include
|
||||
cp $src/include/llama.h $out/include/
|
||||
|
||||
''
|
||||
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd llama-server --bash <($out/bin/llama-server --completion-bash)
|
||||
''
|
||||
+ optionalString rpcSupport "cp bin/rpc-server $out/bin/llama-rpc-server";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user