nix: clean sources more thoroughly

...this way outPaths change less frequently,
and so there are fewer rebuilds
This commit is contained in:
Someone Serge 2023-12-26 22:20:07 +00:00
parent 1efbc6b064
commit 82e48e2567
No known key found for this signature in database
GPG key ID: 7B0E3B1390D61DA4

View file

@ -112,7 +112,16 @@ effectiveStdenv.mkDerivation (
pname = "llama-cpp${pnameSuffix}"; pname = "llama-cpp${pnameSuffix}";
version = llamaVersion; version = llamaVersion;
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 ../../.; src = lib.cleanSource ../../.;
};
postPatch = '' postPatch = ''
substituteInPlace ./ggml-metal.m \ substituteInPlace ./ggml-metal.m \