DontEatOreo
2024-07-19 14:02:20 +03:00
co-authored by SomeoneSerge
parent 8a5dd42ea5
commit 1cbd07c4e6
+11
View File
@@ -5,6 +5,7 @@
makeWrapper,
gitUpdater,
python3Packages,
python311Packages ? null, # Ignored. Kept for compatibility with the release
tk,
addDriverRunpath,
@@ -31,6 +32,8 @@
vulkan-loader,
metalSupport ? stdenv.isDarwin && stdenv.isAarch64,
march ? "",
mtune ? "",
}:
let
@@ -106,6 +109,14 @@ effectiveStdenv.mkDerivation (finalAttrs: {
env.NIX_LDFLAGS = lib.concatStringsSep " " (finalAttrs.darwinLdFlags ++ finalAttrs.metalLdFlags);
env.NIX_CFLAGS_COMPILE =
lib.optionalString (march != "") (
lib.warn "koboldcpp: the march argument is only kept for compatibility; use overrideAttrs intead" "-march=${march}"
)
+ lib.optionalString (mtune != "") (
lib.warn "koboldcpp: the mtune argument is only kept for compatibility; use overrideAttrs intead" "-mtune=${mtune}"
);
makeFlags = [
(makeBool "LLAMA_OPENBLAS" openblasSupport)
(makeBool "LLAMA_CUBLAS" cublasSupport)