From 82e48e256725f4865dd92a307786b4713e551af7 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Tue, 26 Dec 2023 22:20:07 +0000 Subject: [PATCH] nix: clean sources more thoroughly ...this way outPaths change less frequently, and so there are fewer rebuilds --- .devops/nix/package.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.devops/nix/package.nix b/.devops/nix/package.nix index c54a7c3c6..2d0099457 100644 --- a/.devops/nix/package.nix +++ b/.devops/nix/package.nix @@ -112,7 +112,16 @@ effectiveStdenv.mkDerivation ( pname = "llama-cpp${pnameSuffix}"; version = llamaVersion; - src = lib.cleanSource ../../.; + src = lib.cleanSourceWith { + filter = + name: type: + !(builtins.any (_: _) [ + (lib.hasSuffix ".nix" name) # Ignore *.nix files when computing outPaths + (name == "README.md") # Ignore *.md changes whe computing outPaths + (lib.hasPrefix "." name) # Skip hidden files and directories + ]); + src = lib.cleanSource ../../.; + }; postPatch = '' substituteInPlace ./ggml-metal.m \