Build proot with Nix

This commit is contained in:
Alexander Sosedkin 2019-04-14 21:17:48 +07:00
parent f9c53aa84d
commit bd7335afa7
6 changed files with 144 additions and 15 deletions

5
script
View file

@ -28,6 +28,9 @@ export PROOT_NO_SECCOMP=1 # see https://github.com/proot-me/PRoot/issues/106
rm -rf ./bootstrap
mkdir -p bootstrap
echo "building proot-tgt (this may take a lot of time...)"
nix build -f proot.nix -o proot-tgt
wget https://github.com/proot-me/proot-static-build/blob/master/static/proot-x86_64?raw=true -O proot-host
chmod +x proot-host
@ -74,7 +77,7 @@ $PROOT_CMD "$TGT_NIX/bin/nix-store" --load-db < bootstrap/nix-installer/.reginfo
echo "injecting proot..."
mkdir -p bootstrap/bin
cp proot-tgt bootstrap/bin/proot
cp proot-tgt/bin/proot bootstrap/bin/proot
echo "making up some resolv.conf..."
mkdir -p bootstrap/etc