diff options
author | makefu <github@syntax-fehler.de> | 2017-07-03 10:49:42 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2017-07-03 10:49:42 +0200 |
commit | 5bf562cd78dbe1050de27fae1dcc2ffc305cef18 (patch) | |
tree | f7bcee9152c5f44cfb91523def097337ffcf4691 /krebs | |
parent | ed257db34c2225c26912ad05e31493f94b6897d7 (diff) | |
parent | 70e5b248691010a81a121d206d039cce816a8a79 (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/4lib/infest/prepare.sh | 14 | ||||
-rw-r--r-- | krebs/5pkgs/simple/whatsupnix/whatsupnix.bash | 9 |
2 files changed, 13 insertions, 10 deletions
diff --git a/krebs/4lib/infest/prepare.sh b/krebs/4lib/infest/prepare.sh index 8e921ce06..50d521e17 100644 --- a/krebs/4lib/infest/prepare.sh +++ b/krebs/4lib/infest/prepare.sh @@ -36,7 +36,14 @@ prepare() {( ;; esac ;; - nixos|stockholm) + nixos) + case $(cat /proc/cmdline) in + *' root=LABEL=NIXOS_ISO '*) + prepare_nixos_iso "$@" + exit + esac + ;; + stockholm) case $(cat /proc/cmdline) in *' root=LABEL=NIXOS_ISO '*) prepare_nixos_iso "$@" @@ -95,8 +102,7 @@ prepare_nixos_iso() { mkdir -p bin rm -f bin/nixos-install cp "$(type -p nixos-install)" bin/nixos-install - sed -i 's@^\(\(export \|\)NIX_PATH\)=\"[^\"]*\"@\1=$target_path@' bin/nixos-install - + sed -i "s@^NIX_PATH=\"[^\"]*\"@NIX_PATH=$target_path@" bin/nixos-install } get_nixos_install() { @@ -211,7 +217,7 @@ prepare_common() {( mkdir -p bin rm -f bin/nixos-install cp "$(type -p nixos-install)" bin/nixos-install - sed -i 's@^\(\(export \|\)NIX_PATH\)=\"[^\"]*\"@\1=$target_path@' bin/nixos-install + sed -i "s@^NIX_PATH=\"[^\"]*\"@NIX_PATH=$target_path@" bin/nixos-install if ! grep -q '^PATH.*#krebs' .bashrc; then echo '. /root/.nix-profile/etc/profile.d/nix.sh' >> .bashrc diff --git a/krebs/5pkgs/simple/whatsupnix/whatsupnix.bash b/krebs/5pkgs/simple/whatsupnix/whatsupnix.bash index 042763048..2ad9aadc9 100644 --- a/krebs/5pkgs/simple/whatsupnix/whatsupnix.bash +++ b/krebs/5pkgs/simple/whatsupnix/whatsupnix.bash @@ -17,25 +17,22 @@ # 2 Build error; at least one failed derivation could be found. # -GAWK=${GAWK:-gawk} -NIX_STORE=${NIX_STORE:-nix-store} - failed_drvs=$(mktemp --tmpdir whatsupnix.XXXXXXXX) trap 'rm -f -- "$failed_drvs"' EXIT exec >&2 -$GAWK -v failed_drvs="$failed_drvs" ' +gawk -v failed_drvs="$failed_drvs" ' match($0, /^builder for ‘(\/nix\/store\/[^’]+\.drv)’ failed/, m) { print m[1] >> failed_drvs } - { print $0 } + { print $0; fflush("/dev/stdout") } ' case $# in 0) print_log() { - NIX_PAGER= $NIX_STORE -l "$1" + NIX_PAGER= nix-store -l "$1" } ;; 1) |