mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-14 19:37:48 +00:00
llama-cpp: fix build due to openblas update
add patch so build checks for openblas64 module https://github.com/NixOS/nixpkgs/pull/255443 updated from openblas 0.3.21 -> 0.3.24. openblas 0.3.22 moved openblas.pc -> openblas64.pc https://github.com/OpenMathLib/OpenBLAS/issues/3790
This commit is contained in:
parent
2a85706366
commit
05967f9a2c
@ -2,6 +2,7 @@
|
||||
, cmake
|
||||
, darwin
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, nix-update-script
|
||||
, stdenv
|
||||
, symlinkJoin
|
||||
@ -46,6 +47,17 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-TYklPkqwXLt+80FSHBDA2r3xTXlmgqB7sOt2mNnVNso=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# openblas > v0.3.21 64-bit pkg-config file is now named openblas64.pc
|
||||
# can remove when patch is accepted upstream
|
||||
# https://github.com/ggerganov/llama.cpp/pull/4134
|
||||
(fetchpatch {
|
||||
name = "openblas64-pkg-config.patch";
|
||||
url = "https://github.com/ggerganov/llama.cpp/commit/c885cc9f76c00557601b877136191b0f7aadc320.patch";
|
||||
hash = "sha256-GBTxCiNrCazYRvcHwbqVMAALuJ+Svzf5BE7+nkxw064=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace ./ggml-metal.m \
|
||||
--replace '[bundle pathForResource:@"ggml-metal" ofType:@"metal"];' "@\"$out/bin/ggml-metal.metal\";"
|
||||
|
Loading…
Reference in New Issue
Block a user