koboldcpp: backport old interfaces
Refs: https://github.com/NixOS/nixpkgs/pull/327102#discussion_r1677136308 Refs: https://github.com/NixOS/nixpkgs/pull/327102#discussion_r1677136419 Refs: https://github.com/NixOS/nixpkgs/pull/327102#discussion_r1677137201 Co-authored-by: SomeoneSerge <sergei.kozlukov@aalto.fi>
This commit is contained in:
co-authored by
SomeoneSerge
parent
8a5dd42ea5
commit
1cbd07c4e6
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user