Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 368702 to release 24.11] koboldcpp: 1.79.1 -> 1.81 #369092

Merged
22 changes: 10 additions & 12 deletions pkgs/by-name/ko/koboldcpp/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,28 @@
fetchFromGitHub,
stdenv,
makeWrapper,
gitUpdater,
python3Packages,
tk,
addDriverRunpath,

apple-sdk_12,
darwinMinVersionHook,

koboldLiteSupport ? true,

config,
cudaPackages ? { },

openblasSupport ? !stdenv.hostPlatform.isDarwin,
openblas,

cublasSupport ? config.cudaSupport,
# You can find a full list here: https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/
# For example if you're on an GTX 1080 that means you're using "Pascal" and you need to pass "sm_60"
# For example if you're on an RTX 3060 that means you're using "Ampere" and you need to pass "sm_86"
cudaArches ? cudaPackages.cudaFlags.realArches or [ ],

clblastSupport ? stdenv.hostPlatform.isLinux,
clblast,
ocl-icd,

vulkanSupport ? true,
vulkanSupport ? (!stdenv.hostPlatform.isDarwin),
vulkan-loader,
metalSupport ? stdenv.hostPlatform.isDarwin,
nix-update-script,
Expand All @@ -44,13 +41,13 @@ let
in
effectiveStdenv.mkDerivation (finalAttrs: {
pname = "koboldcpp";
version = "1.79.1";
version = "1.81";

src = fetchFromGitHub {
owner = "LostRuins";
repo = "koboldcpp";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-RHeEI6mJklGF7BQXxLwxSr1xD6GsI9+fio888UxKru0=";
tag = "v${finalAttrs.version}";
hash = "sha256-VRT/8rlLI3J/w8hPJ+g7UYSczbRwemz6R8bO+HLAiMM=";
};

enableParallelBuilding = true;
Expand All @@ -65,8 +62,10 @@ effectiveStdenv.mkDerivation (finalAttrs: {
buildInputs =
[ tk ]
++ finalAttrs.pythonInputs
++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_12 ]
++ lib.optionals openblasSupport [ openblas ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_12
(darwinMinVersionHook "10.15")
]
++ lib.optionals cublasSupport [
cudaPackages.libcublas
cudaPackages.cuda_nvcc
Expand All @@ -82,7 +81,6 @@ effectiveStdenv.mkDerivation (finalAttrs: {
pythonPath = finalAttrs.pythonInputs;

makeFlags = [
(makeBool "LLAMA_OPENBLAS" openblasSupport)
(makeBool "LLAMA_CUBLAS" cublasSupport)
(makeBool "LLAMA_CLBLAST" clblastSupport)
(makeBool "LLAMA_VULKAN" vulkanSupport)
Expand Down
Loading