nixos-generators icon indicating copy to clipboard operation
nixos-generators copied to clipboard

Use `unsafeDiscardReferences`

Open RaitoBezarius opened this issue 2 years ago • 1 comments

Okay @Mic92 has the context

RaitoBezarius avatar May 11 '23 13:05 RaitoBezarius

When using [structured attributes](#adv-attr-structuredAttrs), the
attribute `unsafeDiscardReferences` is an attribute set with a boolean value for each output name.
If set to `true`, it disables scanning the output for runtime dependencies.

Example:

```nix
__structuredAttrs = true;
unsafeDiscardReferences.out = true;
```

This is useful, for example, when generating self-contained filesystem images with
their own embedded Nix store: hashes found inside such an image refer
to the embedded store and not to the host's Nix store.

Mic92 avatar May 11 '23 15:05 Mic92