Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
pkgs/build-support/trivial-builders: add runCommandLocal #74642
A definition I’ve been copy-pasting everywhere so far, so it’s finally
I’m using a remote builder for my regular nix builds, so trivial
If we just always build these, we gain some build time, so let’s make
Motivation for this change
A definition I’ve been copy-pasting everywhere so far, so it’s finally time to add it to nixpkgs. I’m using a remote builder for my regular nix builds, so trivial `runCommand`s which first try a substitution and then copy the inputs to the builder to run for 0.2s are quite noticable. If we just always build these, we gain some build time, so let’s make it easy to switch from remote to local.
The link in the note points to the `id` added in NixOS/nix#3255, so it might take some time to start working correctly.
We shouldn’t force the user to have a C compiler in scope, just because the derivation is forced to build locally. That can’t be counted as “lightweight” anymore. Co-Authored-By: Silvan Mosberger<email@example.com>