chore(image): pass all store paths at once via stdin to nix copy

This commit is contained in:
TECHNOFAB 2024-11-27 13:15:50 +00:00
parent a85c4e49fe
commit 90a4079200

View file

@ -163,11 +163,8 @@
(finalizeScript
# sh
''
while read entry; do
[[ "$entry" == *.drv ]] && entry+="^*" || true
nix copy --quiet --to "file://$(pwd)/.nix-cache" $entry || true
echo -n "."
done
# add ^* to all store paths ending in .drv (prevent warning log spam)
${pkgs.gnused}/bin/sed '/\.drv$/s/$/^*/' | nix copy --quiet --to "file://$(pwd)/.nix-cache" --stdin || true
'')
];
image-cachix = mkImage [