Demi Marie Obenour writes: > This prevents lengthy and pointless scans of large image files. > dontFixup is added to the derivations that already used > unsafeDiscardReferences. Both dontFixup and unsafeDiscardReferences are > added to a derivation that builds an ext4 filesystem image. > > Signed-off-by: Demi Marie Obenour > --- > host/initramfs/default.nix | 3 +++ > host/rootfs/default.nix | 1 + > img/app/default.nix | 2 ++ > release/checks/integration/default.nix | 2 ++ > release/combined/default.nix | 3 +++ > release/combined/eosimages.nix | 1 + > release/live/default.nix | 2 ++ > vm-lib/make-vm.nix | 1 + > vm/sys/net/default.nix | 2 ++ > 9 files changed, 17 insertions(+) Good idea! > diff --git a/release/checks/integration/default.nix b/release/checks/integration/default.nix > index 570918613e083b0c2d7c82486544b6405ae5ea89..582a4be8df3098ddaf318b7dac60690c2f8b2304 100644 > --- a/release/checks/integration/default.nix > +++ b/release/checks/integration/default.nix > @@ -37,6 +37,8 @@ let > > userData = runCommand "user-data.img" { > nativeBuildInputs = [ e2fsprogs tar2ext4 ]; > + unsafeDiscardReferences = true; > + dontFixup = true; > } '' > tar -Pcvf root.tar \ > --transform=s,^${appimage},test.appimage, ${appimage} \ This is not correct, because 1) unsafeDiscardReferences is an attribute set; 2) it doesn't do anything without __structuredAttrs. https://nix.dev/manual/nix/2.26/language/advanced-attributes#adv-attr-unsafeDiscardReferences So I'm going to make a standalone commit first that adds __structuredAttrs and unsafeDiscardReferences here, and then apply the rest of this. I'll also tweak it to group __structuredAttrs, unsafeDiscardReferences, and dontFixup, so it's clear they should be applied together if being copied.