]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
flake : add runHook preInstall/postInstall to installPhase so hooks function (#2224)
authorDave Della Costa <redacted>
Fri, 14 Jul 2023 19:13:38 +0000 (15:13 -0400)
committerGitHub <redacted>
Fri, 14 Jul 2023 19:13:38 +0000 (22:13 +0300)
flake.nix

index cebb47b94c92e47e69296da8d169889ef4d371d6..dda7ee7b76adef9174fe4914a3f9ac95aa34d4a0 100644 (file)
--- a/flake.nix
+++ b/flake.nix
@@ -43,6 +43,8 @@
             "-DLLAMA_METAL=ON"
           ]);
           installPhase = ''
+            runHook preInstall
+
             mkdir -p $out/bin
             mv bin/* $out/bin/
             mv $out/bin/main $out/bin/llama
@@ -51,6 +53,8 @@
             echo "#!${llama-python}/bin/python" > $out/bin/convert.py
             cat ${./convert.py} >> $out/bin/convert.py
             chmod +x $out/bin/convert.py
+
+            runHook postInstall
           '';
           meta.mainProgram = "llama";
         };