Skip to content

Commit b613968

Browse files
committed
perf(core.wrapper): preferLocalBuild by default
https://nix.dev/manual/nix/2.33/protocols/json/derivation/options.html#preferLocalBuild This prevents it from checking a remote cache for your wrapper derivation with your settings in it. Many wrapper derivation generators for various programs in nixpkgs and external flakes set this in their derivation, as the derivation contains user provided settings which will not be in a remote cache. For the vast majority of wrapper derivations, the cost of checking the network should far exceed the amount of time it takes to link/copy/convert the files in the wrapper derivation. If you have already built your wrapper derivation locally, it will still check your local cache.
1 parent 6316917 commit b613968

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/core.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,7 @@ in
916916
dontConfigure = true;
917917
dontPatch = true;
918918
dontFixup = true;
919+
preferLocalBuild = true;
919920
name = package.name or "${package.pname or binName}-${version}";
920921
${
921922
if builtins.isString (package.pname or binName) && package.pname or binName != "" then

0 commit comments

Comments
 (0)