From e6389026bc5e04c2aa4c5a55fbb601f22d27fc80 Mon Sep 17 00:00:00 2001 From: Birdee <85372418+BirdeeHub@users.noreply.github.com> Date: Sun, 3 May 2026 09:31:37 -0700 Subject: [PATCH] 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. --- lib/core.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/core.nix b/lib/core.nix index 92b48f46..d59490d5 100644 --- a/lib/core.nix +++ b/lib/core.nix @@ -916,6 +916,7 @@ in dontConfigure = true; dontPatch = true; dontFixup = true; + preferLocalBuild = true; name = package.name or "${package.pname or binName}-${version}"; ${ if builtins.isString (package.pname or binName) && package.pname or binName != "" then