git ssb

0+

clacke / gists



Tree: 83e303c45fd32bc34d2cd8c96b7aa2c84a431af0

Files: 83e303c45fd32bc34d2cd8c96b7aa2c84a431af0 / cron.daily / guix

1925 bytesRaw
1#!/var/guix/profiles/execline/bin/execlineb
2export LANG C
3export LC_ALL C
4define GUIX_PROFILE /var/guix/profiles/per-app/guix-0.11.0/profile
5define BIN ${GUIX_PROFILE}/bin
6
7define GUIX_EXPR "(@ (gnu packages package-management) guix-0.11.0)"
8backtick -ni HEAD {
9 pipeline -w {
10 awk "/refs\\/heads\\/master/ { print $1 }"
11 }
12 git ls-remote http://git.sv.gnu.org/cgit/guix.git
13}
14import -u HEAD
15define URL http://git.savannah.gnu.org/cgit/guix.git/snapshot/guix-${HEAD}.tar.gz
16
17foreground {
18 redirfd -w 1 /dev/null fdmove -c 2 1 ${BIN}/guix pull --url=$URL
19}
20foreground {
21 redirfd -w 1 /dev/null fdmove -c 2 1 ${BIN}/guix build -e $GUIX_EXPR
22}
23if {
24 pipeline -w {
25 pipeline { grep -vE "Starting download|master.tar.gz|unpacking|already up to date|^$" }
26 pipeline { grep -vE "unpacking|updating list|derivation will|guix-latest.tar.gz" }
27 pipeline { grep -vE "loading|compiling|successfully deployed" }
28 pipeline { grep -vE "building.*guix-latest" }
29 pipeline { grep -vE "B transferred" }
30 pipeline { grep -vE "derivations will be built|[.]drv$" }
31 pipeline { grep -vE "derivation will" }
32 pipeline { grep -vE "substitute: updating list of substitutes" }
33 grep -vE "substitute"
34 }
35 fdmove -c 2 1 ${BIN}/guix environment --pure --ad-hoc -e $GUIX_EXPR --
36 guix pull --url=$URL
37}
38if {
39 pipeline -w {
40 pipeline { grep -vE "B transferred" }
41 pipeline { grep -vE "derivations will be built|[.]drv$" }
42 grep -vE "derivation will"
43 }
44 fdmove -c 2 1 ${BIN}/guix environment --pure --ad-hoc -e $GUIX_EXPR --
45 guix package -p $GUIX_PROFILE -e $GUIX_EXPR
46}
47if {
48 pipeline -w {
49 grep -vE "ok: run:"
50 }
51 fdmove -c 2 1 /usr/bin/sv -v -w 60 restart /etc/sv/guix-daemon/
52}
53
54pipeline -w {
55 pipeline { grep -vE "B transferred" }
56 pipeline { grep -vE "derivations will be built|[.]drv$" }
57 grep -vE "derivation will|othing to be done"
58}
59fdmove -c 2 1 ${BIN}/guix package --fallback -u

Built with git-ssb-web