-
-
Notifications
You must be signed in to change notification settings - Fork 150
/
default.nix
51 lines (46 loc) · 1.5 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ device ? null
, configuration ? { }
, silent ? false
, pkgs ? import ./nixpkgs.nix { }
, src ? null
}:
let
release-tools = import ./support/nix/release-tools.nix { inherit pkgs; };
inherit (release-tools)
allDevices
;
evalFor = device:
import ./support/nix/eval-with-configuration.nix ({
inherit device;
inherit pkgs;
verbose = true;
configuration = {
imports = [
configuration
(
{ lib, ... }:
{
# Special configs for imperative use only here
system.automaticCross = true;
Tow-Boot.src = lib.mkIf (src != null) src;
}
)
];
};
})
;
outputs = builtins.listToAttrs (builtins.map (device: { name = device; value = evalFor device; }) allDevices);
outputsCount = builtins.length (builtins.attrNames outputs);
in
outputs // {
___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);
}