Skip to content

Commit af2dfde

Browse files
committed
feat(flake): add fast build apps
Expose nix-fast-build through flake apps for checks and packages so repo validation can use parallel evaluation and build orchestration without replacing switch or activation workflows.
1 parent eb56620 commit af2dfde

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

flake/apps.nix

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,20 @@ _: {
7373
groupApps = lib.mapAttrs' (
7474
name: value: lib.nameValuePair "update-${name}" (mkUpdateApp name value)
7575
) inputGroups;
76+
77+
mkFastBuildApp = name: flakeRef: description: {
78+
type = "app";
79+
meta.description = description;
80+
program = lib.getExe (
81+
pkgs.writeShellApplication {
82+
name = "fast-build-${name}";
83+
runtimeInputs = [ pkgs.nix-fast-build ];
84+
text = ''
85+
nix-fast-build --flake ${flakeRef} --no-link "$@"
86+
'';
87+
}
88+
);
89+
};
7690
in
7791
{
7892
apps = groupApps // {
@@ -107,6 +121,13 @@ _: {
107121
program = lib.getExe (pkgs.callPackage ../packages/closure-analyzer/package.nix { });
108122
};
109123

124+
fast-build-checks =
125+
mkFastBuildApp "checks" ".#checks"
126+
"Evaluate and build checks with nix-fast-build";
127+
fast-build-packages =
128+
mkFastBuildApp "packages" ".#packages"
129+
"Evaluate and build packages with nix-fast-build";
130+
110131
update-plugins =
111132
let
112133
pythonWithRich = pkgs.python3.withPackages (ps: with ps; [ rich ]);

0 commit comments

Comments
 (0)