forked from Tow-Boot/Tow-Boot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.nix
34 lines (28 loc) · 970 Bytes
/
release.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
# This expression is used to produce the release artifacts.
# To build for a particular board, please refer to `default.nix` instead.
# This is a "clean" Nixpkgs. No overlays have been applied yet.
{ pkgs ? import ./nixpkgs.nix {} }:
let
inherit (pkgs.lib)
concatStringsSep
filter
;
anonymousEval = release-tools.evalFor {} {
hardware.soc = "generic-aarch64";
};
# We're slightly cheating here
version = "${anonymousEval.config.Tow-Boot.uBootVersion}-${anonymousEval.config.Tow-Boot.towBootIdentifier}";
release-tools = import ./support/nix/release-tools.nix { inherit pkgs; };
in
pkgs.runCommand "Tow-Boot.release.${version}" {
inherit version;
} ''
mkdir -p $out
PS4=" $ "
${concatStringsSep "\n" (builtins.map (eval: ''
(
echo " :: Packaging ${eval.config.device.identifier}"
cp ${eval.build.archive} $out/${eval.build.archive.name}
)
'') release-tools.releasedDevicesEvaluations)}
''