Skip to content

contentAddressedByDefault = true;: nix repl's :b command fails #5328

@trofi

Description

@trofi

here is an example session that should illustrate failure when running in nixpkgs repository root:

$ nix repl . --arg config '{ contentAddressedByDefault = true; }'
Welcome to Nix version 2.4pre20210922_bcd73eb. Type :? for help.

Loading '.'...
Added 15104 variables.

nix-repl> :b bash

this derivation produced the following outputs:
error: out of memory
<bad>

For comparison non-CA build succeeds:

$ nix repl .
Welcome to Nix version 2.4pre20210922_bcd73eb. Type :? for help.

Loading '.'...
Added 15104 variables.

nix-repl> :b bash

this derivation produced the following outputs:
  dev -> /nix/store/j3cjxcv029ygyhk50lbq9l8q4zipg0ap-bash-5.1-p8-dev
  doc -> /nix/store/d74k1vhpnr78zn2yp90y1lk5za1gha0p-bash-5.1-p8-doc
  info -> /nix/store/g3v0p93i37l1fp6q4mv2dgq1d20p4va3-bash-5.1-p8-info
  man -> /nix/store/rgw0cfc6716f70q66zrglcspiz64bmnm-bash-5.1-p8-man
  out -> /nix/store/qfb4j7w2fjjq953nd9xncz5mymj5n0kb-bash-5.1-p8
<ok>

CA nix build also succeeds:

$ nix build -f. bash --arg config '{ contentAddressedByDefault = true; }'
<ok>

Cc @regnat

Metadata

Metadata

Assignees

Labels

bugca-derivationsDerivations with content addressed outputs

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions