From d3c84b0d2981f46574046e19d8e3d618065b92a0 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 9 Sep 2018 10:04:13 +0200 Subject: buildbot-stockholm: build quietly and show trace --- krebs/2configs/buildbot-stockholm.nix | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/krebs/2configs/buildbot-stockholm.nix b/krebs/2configs/buildbot-stockholm.nix index 6555b73f4..add27f395 100644 --- a/krebs/2configs/buildbot-stockholm.nix +++ b/krebs/2configs/buildbot-stockholm.nix @@ -12,11 +12,26 @@ let "http://cgit.prism.r/stockholm" ]; + # usage: build USER HOST + # This executable is meant to be run with as working directory. + # USER is expected to be a subdirectory of the working directory. build = pkgs.writeDash "build" '' - set -eu - export USER="$1" - export SYSTEM="$2" - $(nix-build $USER/krops.nix --no-out-link --argstr name "$SYSTEM" --argstr target "$HOME/stockholm-build" -A ci) + set -efu + + user=$1 + host=$2 + + result=$(nix-build \ + --argstr name "$host" \ + --argstr target "$HOME"/stockholm-build \ + --attr ci \ + --no-build-output \ + --no-out-link \ + --show-trace \ + "$user"/krops.nix \ + ) + + exec "$result" ''; -- cgit v1.2.3