Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b9cffd
commit 9116aae
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
|
||
cmd=sh | ||
if ! [ $# -eq 0 ]; then | ||
cmd=$@ | ||
fi | ||
|
||
# should download this in the future | ||
# but the mirror is down | ||
proot=`dirname $0`/proot-`uname -p` | ||
export PROOT_NO_SECCOMP=1 | ||
|
||
if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then . $HOME/.nix-profile/etc/profile.d/nix.sh; fi | ||
|
||
if [ -z "$IN_PROOT" ]; then | ||
export IN_PROOT=1 | ||
|
||
if ! [ -d $HOME/.nix ]; then | ||
mkdir -p $HOME/.nix | ||
s=$(mktemp) | ||
curl https://nixos.org/nix/install -o $s | ||
$proot -b $HOME/.nix:/nix $0 sh $s | ||
fi | ||
|
||
$proot -b $HOME/.nix:/nix $0 $cmd | ||
|
||
export IN_PROOT= | ||
exit | ||
elif ! [ $# -eq 0 ]; then | ||
exec $cmd | ||
fi |
Binary file not shown.