~singpolyma/cheogram

ref: 0b5a421524ce1dc92a6a2bf7b60447f5ab96871e cheogram/.builds/guix.yml -rw-r--r-- 1.1 KiB
0b5a4215Stephen Paul Weber Allow archive to work even when build --with-source 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
image: guix
packages:
- plzip
sources:
- https://git.singpolyma.net/cheogram
secrets:
- 9ded4157-4cf9-42ae-b7d0-55eb6e52ea37
- fd52c9ce-04e8-4684-af6c-1ab78d2e124a
artifacts:
- cheogram.scm
- cheogram.nar.lz
tasks:
- bake: |
    printf "(define-module (cheogram))\n" >> cheogram.scm
    sed '/^;;;;$/q' cheogram/guix.scm >> cheogram.scm
    printf "(define-public cheogram\n\t" >> cheogram.scm
    cd cheogram
    printf '(load "%s/guix.scm")\n(write cheogram-baked)\n' "$(pwd)" | guix repl /dev/stdin >> ../cheogram.scm
    cd -
    printf ")\n" >> cheogram.scm
    rm -f cheogram/guix.scm
    [ "$BUILD_REASON" = patchset ] || rm -rf cheogram
- build: |
    if [ "$BUILD_REASON" = patchset ]; then with_source="--with-source=$PWD/cheogram"; fi
    guix build $with_source --no-grafts -r out -L. cheogram
- archive: |
    if [ -e signing-key.sec ]; then
      sudo mv signing-key.pub /etc/guix/
      sudo mv signing-key.sec /etc/guix/
      sudo chown root:root /etc/guix/signing-key.sec
      sudo chmod 0400 /etc/guix/signing-key.sec
    fi
    guix archive --export -r --no-grafts $(readlink -f out-*) > cheogram.nar
    plzip cheogram.nar