mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +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:
parent
6f3045c2a2
commit
b41cc1a755
7 changed files with 142 additions and 39 deletions
|
@ -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
|
|||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue