packages: create gcroots directory
This commit is contained in:
parent
9b3046d2eb
commit
5c9aa53921
11
packages.nix
11
packages.nix
|
@ -188,15 +188,18 @@ lib.attrsets.mapAttrs
|
||||||
rm -f old
|
rm -f old
|
||||||
[ -e current ] && cp --no-dereference current 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
|
if [[ -e old ]]; then
|
||||||
echo System package diff:
|
echo System package diff:
|
||||||
nix --extra-experimental-features nix-command store diff-closures ./old ./current || true
|
nix --extra-experimental-features nix-command store diff-closures ./old ./current || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ln -sfT \$PWD/current /nix/var/nix/gcroots/microvm/${name}
|
mkdir -p ${gcrootDir}
|
||||||
ln -sfT \$PWD/booted /nix/var/nix/gcroots/microvm/booted-${name}
|
ln -sfT \$PWD/current ${gcrootDir}/${name}
|
||||||
ln -sfT \$PWD/old /nix/var/nix/gcroots/microvm/old-${name}
|
ln -sfT \$PWD/booted ${gcrootDir}/booted-${name}
|
||||||
|
ln -sfT \$PWD/old ${gcrootDir}/old-${name}
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue