Add the builder's plist as a gcroot to avoid it being GCd

This commit is contained in:
Graham Christensen 2018-05-30 15:37:02 -04:00
parent 5fc2efc84d
commit 0b31642b0d
2 changed files with 4 additions and 1 deletions

View File

@ -76,6 +76,9 @@ if [ ! -f "$DIR/server-config.tar" ]; then
)
fi
nix-store --add-root "$DIR/gcroot" --indirect --realize "$PLIST"
launchctl unload ~/Library/LaunchAgents/org.nix-community.linuxkit-builder.plist 2> /dev/null || true
chmod 660 ~/Library/LaunchAgents/org.nix-community.linuxkit-builder.plist 2> /dev/null || true
cp "$PLIST" ~/Library/LaunchAgents/org.nix-community.linuxkit-builder.plist

View File

@ -245,7 +245,7 @@ in buildEnv {
name = "linuxkit-builder";
paths = [
(shellcheckedScriptBin "nix-linuxkit-configure" ./configure.sh {
inherit bash hostPort coreutils openssh gnutar gnugrep ed plist;
inherit bash hostPort coreutils openssh gnutar gnugrep ed plist nix;
example_path = ./example.nix;
})