fix(build): Ensure launch script compatibility with other runtimes

Fixes two launch script compatibility issues with other container
runtimes (such as gvisor):

* don't fail if /tmp already exists
* don't fail if the environment becomes unset
This commit is contained in:
Vincent Ambo 2019-09-21 15:15:14 +01:00 committed by Vincent Ambo
parent 0000b956bb
commit 21a17b33f4

View file

@ -59,8 +59,9 @@ rec {
# issues in containers.
nixery-launch-script = writeShellScriptBin "nixery" ''
set -e
export PATH=${coreutils}/bin:$PATH
export NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt
mkdir /tmp
mkdir -p /tmp
# Create the build user/group required by Nix
echo 'nixbld:x:30000:nixbld' >> /etc/group