Files: c3f5635d0422027748290dbc3838b94ab69ad5a7 / cron.daily / guix
1925 bytesRaw
1 | #!/var/guix/profiles/execline/bin/execlineb |
2 | export LANG C |
3 | export LC_ALL C |
4 | define GUIX_PROFILE /var/guix/profiles/per-app/guix-0.11.0/profile |
5 | define BIN ${GUIX_PROFILE}/bin |
6 | |
7 | define GUIX_EXPR "(@ (gnu packages package-management) guix-0.11.0)" |
8 | backtick -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 | } |
14 | import -u HEAD |
15 | define URL http://git.savannah.gnu.org/cgit/guix.git/snapshot/guix-${HEAD}.tar.gz |
16 | |
17 | foreground { |
18 | redirfd -w 1 /dev/null fdmove -c 2 1 ${BIN}/guix pull --url=$URL |
19 | } |
20 | foreground { |
21 | redirfd -w 1 /dev/null fdmove -c 2 1 ${BIN}/guix build -e $GUIX_EXPR |
22 | } |
23 | if { |
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 | } |
38 | if { |
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 | } |
47 | if { |
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 | |
54 | pipeline -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 | } |
59 | fdmove -c 2 1 ${BIN}/guix package --fallback -u |
Built with git-ssb-web