forked from Tow-Boot/Tow-Boot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
31 lines (26 loc) · 1.18 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
builtins.trace ":: Tow-Boot build infrastructure" (
# This is a "clean" Nixpkgs. No overlays have been applied yet.
{ pkgs ? import ./nixpkgs.nix {}, silent ? false }:
# Break the cycle
let pkgs' = pkgs; in
let
pkgs = import ./support/overlay { pkgs = pkgs'; };
outputs = import ./boards { inherit (pkgs) Tow-Boot; };
outputsCount = builtins.length (builtins.attrNames outputs);
in
# Starting here is "noise" intended to make `nix-build` invocations more
# user-friendly.
outputs // {
# Strategic use of `pkgs` to force evaluation before any tracing happens.
___aaallIsBeingBuilt = if silent then null else (
builtins.trace (pkgs.lib.removePrefix "trace: " ''
trace: +--------------------------------------------------+
trace: | Notice: ${pkgs.lib.strings.fixedWidthString 3 " " (toString outputsCount)} outputs will be built. |
trace: | |
trace: | You may prefer to build a specific output using: |
trace: | |
trace: | $ nix-build -A vendor-board |
trace: +--------------------------------------------------+
'') null);
}
)