Load the Nix database registration too, and let the GC test pass.

This commit is contained in:
Graham Christensen
2020-06-08 09:40:06 -04:00
parent bc81b59c5d
commit 6c13b984d4
2 changed files with 13 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
{ runCommand, nix, jq, path }:
{ closureInfo, runCommand, nix, jq, path }:
let
map-squash = ./map-squash.nix;
@@ -9,6 +9,7 @@ let
exportReferencesGraph = [ "root" storeContents ];
NIX_PATH = "nixpkgs=${path}";
outputs = [ "out" "manifest" ];
closureInfo = closureInfo { rootPaths = storeContents; };
} ''
cat root | grep /nix/store | sort | uniq | jq -R . | jq -s . > paths.json
nix-build ${map-squash} --arg pathsJson ./paths.json
@@ -18,12 +19,15 @@ let
find "$f" -type f >> $out
done
touch $manifest
mkdir $manifest
touch $manifest/squashes
for f in $(cat "$out"); do
prefix=$(echo "$f" | head -c20)
suffix=$(echo "$f" | tail -c+21)
echo "$prefix $suffix" >> $manifest
echo "$prefix $suffix" >> $manifest/squashes
done
cat $closureInfo/registration | gzip -9 > $manifest/registration.gz
'';
in
mkSquashfsManifest