diff options
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/4lib/infest/prepare.sh | 17 | ||||
-rw-r--r-- | krebs/5pkgs/writers.nix | 9 |
2 files changed, 10 insertions, 16 deletions
diff --git a/krebs/4lib/infest/prepare.sh b/krebs/4lib/infest/prepare.sh index d39aca348..ccfc4f49b 100644 --- a/krebs/4lib/infest/prepare.sh +++ b/krebs/4lib/infest/prepare.sh @@ -1,8 +1,8 @@ #! /bin/sh set -efu -nix_url=https://nixos.org/releases/nix/nix-1.10/nix-1.10-x86_64-linux.tar.bz2 -nix_sha256=504f7a3a85fceffb8766ae5e1005de9e02e489742f5a63cc3e7552120b138bf4 +nix_url=https://nixos.org/releases/nix/nix-1.11.13/nix-1.11.13-x86_64-linux.tar.bz2 +nix_sha256=c11411d52d8ad1ce3a68410015487282fd4651d3abefbbb13fa1f7803a2f60de prepare() {( if test -e /etc/os-release; then @@ -14,10 +14,6 @@ prepare() {( ;; centos) case $VERSION_ID in - 6) - prepare_centos "$@" - exit - ;; 7) prepare_centos "$@" exit @@ -51,13 +47,6 @@ prepare() {( esac ;; esac - elif test -e /etc/centos-release; then - case $(cat /etc/centos-release) in - 'CentOS release 6.5 (Final)') - prepare_centos "$@" - exit - ;; - esac fi echo "$0 prepare: unknown OS" >&2 exit -1 @@ -217,7 +206,7 @@ prepare_common() {( mkdir -p bin rm -f bin/nixos-install cp "$(type -p nixos-install)" bin/nixos-install - sed -i "s@^NIX_PATH=\"[^\"]*\"@NIX_PATH=$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/writers.nix b/krebs/5pkgs/writers.nix index 49ca3557e..f1626078e 100644 --- a/krebs/5pkgs/writers.nix +++ b/krebs/5pkgs/writers.nix @@ -144,9 +144,14 @@ with import <stockholm/lib>; env = filevars // { passAsFile = attrNames filevars; }; in + # Use a subshell because <nixpkgs/stdenv/generic/setup.sh>'s genericBuild + # sources (or evaluates) the buildCommand and we don't want to modify its + # shell. In particular, exitHandler breaks in multiple ways with set -u. pkgs.runCommand name env /* sh */ '' - set -efu - ${concatMapStringsSep "\n" (getAttr "install") files} + ( + set -efu + ${concatMapStringsSep "\n" (getAttr "install") files} + ) ''; writeHaskell = |