Unverified Commit 13e80126 authored by Philip Taron's avatar Philip Taron Committed by GitHub
Browse files

llama-cpp: remove workaround for local-ai (#450840)

parents 71024749 3084908a
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -91,19 +91,6 @@ effectiveStdenv.mkDerivation (finalAttrs: {

  patches = lib.optionals vulkanSupport [ ./disable_bfloat16.patch ];

  postPatch = ''
    # Workaround for local-ai package which overrides this package to an older llama-cpp
    if [ -f ./ggml/src/ggml-metal.m ]; then
      substituteInPlace ./ggml/src/ggml-metal.m \
        --replace-fail '[bundle pathForResource:@"ggml-metal" ofType:@"metal"];' "@\"$out/bin/ggml-metal.metal\";"
    fi

    if [ -f ./ggml/src/ggml-metal/ggml-metal.m ]; then
      substituteInPlace ./ggml/src/ggml-metal/ggml-metal.m \
        --replace-fail '[bundle pathForResource:@"ggml-metal" ofType:@"metal"];' "@\"$out/bin/ggml-metal.metal\";"
    fi
  '';

  nativeBuildInputs = [
    cmake
    ninja
+1 −1
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ let
          hash = "sha256-b9B5I3EbBFrkWc6RLXMWcCRKayyWjlGuQrogUcrISrc=";
          fetchSubmodules = true;
        };
        postPatch = prev.postPatch + ''
        postPatch = ''
          cd examples
          cp -r --no-preserve=mode ${src}/backend/cpp/llama grpc-server
          cp llava/clip* llava/llava.* grpc-server