1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 22:33:57 +02:00

Make wrapper derivation

This ensures just `nix build`-ing the flake doesn't forget to run all
tests. One can still specifiy specific attributes to just build one
thing.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
John Ericson 2024-08-14 16:04:35 -04:00
parent 6f3045c2a2
commit b41cc1a755
7 changed files with 142 additions and 39 deletions

View file

@ -27,13 +27,13 @@ in
};
config = {
passthru.quickBuild =
passthru.quickBuild =
let withQuickBuild = extendModules { modules = [{ quickBuild = true; }]; };
in withQuickBuild.config.test;
defaults = { pkgs, ... }: {
config = lib.mkIf test.config.quickBuild {
nix.package = pkgs.nix_noTests;
nix.package = pkgs.nixComponents.nix-cli;
system.forbiddenDependenciesRegexes = [
# This would indicate that the quickBuild feature is broken.
@ -44,4 +44,4 @@ in
};
};
};
}
}