#!/var/guix/profiles/execline/bin/execlineb export LANG C export LC_ALL C define GUIX_PROFILE /var/guix/profiles/per-app/guix-0.11.0/profile define BIN ${GUIX_PROFILE}/bin define GUIX_EXPR "(@ (gnu packages package-management) guix-0.11.0)" backtick -ni HEAD { pipeline -w { awk "/refs\\/heads\\/master/ { print $1 }" } git ls-remote http://git.sv.gnu.org/cgit/guix.git } import -u HEAD define URL http://git.savannah.gnu.org/cgit/guix.git/snapshot/guix-${HEAD}.tar.gz foreground { redirfd -w 1 /dev/null fdmove -c 2 1 ${BIN}/guix pull --url=$URL } foreground { redirfd -w 1 /dev/null fdmove -c 2 1 ${BIN}/guix build -e $GUIX_EXPR } if { pipeline -w { pipeline { grep -vE "Starting download|master.tar.gz|unpacking|already up to date|^$" } pipeline { grep -vE "unpacking|updating list|derivation will|guix-latest.tar.gz" } pipeline { grep -vE "loading|compiling|successfully deployed" } pipeline { grep -vE "building.*guix-latest" } pipeline { grep -vE "B transferred" } pipeline { grep -vE "derivations will be built|[.]drv$" } pipeline { grep -vE "derivation will" } pipeline { grep -vE "substitute: updating list of substitutes" } grep -vE "substitute" } fdmove -c 2 1 ${BIN}/guix environment --pure --ad-hoc -e $GUIX_EXPR -- guix pull --url=$URL } if { pipeline -w { pipeline { grep -vE "B transferred" } pipeline { grep -vE "derivations will be built|[.]drv$" } grep -vE "derivation will" } fdmove -c 2 1 ${BIN}/guix environment --pure --ad-hoc -e $GUIX_EXPR -- guix package -p $GUIX_PROFILE -e $GUIX_EXPR } if { pipeline -w { grep -vE "ok: run:" } fdmove -c 2 1 /usr/bin/sv -v -w 60 restart /etc/sv/guix-daemon/ } pipeline -w { pipeline { grep -vE "B transferred" } pipeline { grep -vE "derivations will be built|[.]drv$" } grep -vE "derivation will|othing to be done" } fdmove -c 2 1 ${BIN}/guix package --fallback -u