Paste number 335235: android guix

Paste number 335235: android guix
Pasted by: roptat
When:4 years, 11 months ago
Share:Tweet this! | http://paste.lisp.org/+76O3
Channel:None
Paste contents:
Raw Source | XML | Display As
# from your computer
wget ftp://alpha.gnu.org/gnu/guix/guix-binary-0.12.0.armhf-linux.tar.xz
adb root
adb push guix-binary-0.12.0.armhf-linux.tar.xz /data
# glibc needs these two files for networking
adb push /etc/protocols /system/etc/
adb push /etc/services /system/etc/
# and this one to perform dns queries, you probably need to change nameservers if you use mobile data
adb push /etc/resolv.conf /etc/
adb shell

# from the new shell
mount -o remount,rw /
mkdir /gnu /var
# if you don't have /etc
#ln -sv /system/etc /
mount -o remount,ro /
mount /dev/block/bootdevice/by-name/userdata /gnu
mount /dev/block/bootdevice/by-name/userdata /var
cd /data
tar xf guix-binary-0.12.0.armhf-linux.tar.xz
mv gnu/store .
mv var/guix .
rmdir gnu
rmdir var

# create guix users and root for glibc
cat > /etc/passwd << EOF
root:x:0:0:root:/data:/sbin/sh
nobody:x:99:99:nobody:/:/usr/bin/nologin
guixbuilder01:x:994:994:Guix build user 01:/var/empty:/usr/bin/nologin
guixbuilder02:x:993:994:Guix build user 02:/var/empty:/usr/bin/nologin
guixbuilder03:x:992:994:Guix build user 03:/var/empty:/usr/bin/nologin
guixbuilder04:x:991:994:Guix build user 04:/var/empty:/usr/bin/nologin
guixbuilder05:x:990:994:Guix build user 05:/var/empty:/usr/bin/nologin
guixbuilder06:x:989:994:Guix build user 06:/var/empty:/usr/bin/nologin
guixbuilder07:x:988:994:Guix build user 07:/var/empty:/usr/bin/nologin
guixbuilder08:x:987:994:Guix build user 08:/var/empty:/usr/bin/nologin
guixbuilder09:x:986:994:Guix build user 09:/var/empty:/usr/bin/nologin
guixbuilder10:x:985:994:Guix build user 10:/var/empty:/usr/bin/nologin
EOF

cat > /etc/group << EOF
root:x:0:root
guixbuild:x:994:guixbuilder01,guixbuilder02,guixbuilder03,guixbuilder04,guixbuilder05,guixbuilder06,guixbuilder07,guixbuilder08,guixbuilder09,guixbuilder10
EOF

export HOME=/data
ln -sf /var/guix/profiles/per-user/root/guix-profile \
         ~root/.guix-profile

export PATH="/data/.guix-profile/bin:/data/.guix-profile/sbin:$PATH"
guix-daemon --build-users-group=guixbuild --disable-chroot &

# enjoy :D
guix pull

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.