From 5c9aa5392158c7162190de83d7469ed5166277f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 7 Jan 2024 03:41:02 +0100 Subject: [PATCH] packages: create gcroots directory --- packages.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages.nix b/packages.nix index 6a65d6b8..f330b8e2 100644 --- a/packages.nix +++ b/packages.nix @@ -188,15 +188,18 @@ lib.attrsets.mapAttrs rm -f old [ -e current ] && cp --no-dereference current old ''; - createSymlinks = name: '' + createSymlinks = name: let + gcrootDir = "/nix/var/nix/gcroots/microvm"; + in /* bash */ '' if [[ -e old ]]; then echo System package diff: nix --extra-experimental-features nix-command store diff-closures ./old ./current || true fi - ln -sfT \$PWD/current /nix/var/nix/gcroots/microvm/${name} - ln -sfT \$PWD/booted /nix/var/nix/gcroots/microvm/booted-${name} - ln -sfT \$PWD/old /nix/var/nix/gcroots/microvm/old-${name} + mkdir -p ${gcrootDir} + ln -sfT \$PWD/current ${gcrootDir}/${name} + ln -sfT \$PWD/booted ${gcrootDir}/booted-${name} + ln -sfT \$PWD/old ${gcrootDir}/old-${name} ''; in {