nixpkgs/pkgs/tools/misc/ollama/replace-gcc.patch
abysssol 828b4dc30e ollama: 0.1.17 -> 0.1.24
Remove outdated patches and substitution of llama.cpp server.

Patch source build script to remove git.
Ollama's `go generate` script assumes the source is an
initialized git repository, which it is not in nix.
So, remove usage of `git` and replace it with `patch`.
Also replace call to `g++` with `$CXX`.

Run `go generate` to build dependencies using
ollama's custom build script.
2024-02-16 16:23:25 -05:00

11 lines
535 B
Diff

--- a/llm/generate/gen_common.sh
+++ b/llm/generate/gen_common.sh
@@ -86,7 +89,7 @@
cmake -S ${LLAMACPP_DIR} -B ${BUILD_DIR} ${CMAKE_DEFS}
cmake --build ${BUILD_DIR} ${CMAKE_TARGETS} -j8
mkdir -p ${BUILD_DIR}/lib/
- g++ -fPIC -g -shared -o ${BUILD_DIR}/lib/libext_server.${LIB_EXT} \
+ $CXX -fPIC -g -shared -o ${BUILD_DIR}/lib/libext_server.${LIB_EXT} \
${GCC_ARCH} \
${WHOLE_ARCHIVE} ${BUILD_DIR}/examples/server/libext_server.a ${NO_WHOLE_ARCHIVE} \
${BUILD_DIR}/common/libcommon.a \