nix-gh/dev-shell
Sönke Hahn b1d39d4765 dev-shell is a bash script, not sh
'type -p' does not work in e.g. dash
2014-05-26 17:21:20 +02:00

18 lines
505 B
Bash
Executable file

#!/usr/bin/env bash
if [ -e tests/test-tmp ]; then
chmod -R u+w tests/test-tmp
rm -rf tests/test-tmp
fi
s=$(type -p nix-shell)
exec $s release.nix -A tarball --command "
export NIX_REMOTE=daemon
export NIX_PATH='$NIX_PATH'
export NIX_BUILD_SHELL=$(type -p bash)
export c=\$configureFlags
exec $s release.nix -A build.x86_64-linux --exclude tarball --command '
configureFlags+=\" \$c --prefix=$(pwd)/inst --sysconfdir=$(pwd)/inst/etc\"
return
'" \
"$@"