[Nix-dev] nix-store --dump-db / --load-db for specific paths?

Eelco Dolstra eelco.dolstra at logicblox.com
Fri Dec 20 11:38:19 CET 2013


Hi,

On 17/12/13 13:01, Rickard Nilsson wrote:

> Is it possible to do the equivalence of nix-store --dump-db/--load-db 
> for a specific path, not the whole db? I know there is nix-store 
> --register-validity, but how do you create the input to that command for 
> an existing path?

AFAIK, there is no command for that, but the format is pretty simple:

  <store path>
  <sha256 hash of the NAR in base-16>
  <size of the NAR (nix-store -q --size)>
  <deriver (can be empty>
  <number of references>
  <the references, one per line>

You can omit the hash and the size if you're not passing the --hash-given flag.

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/


More information about the nix-dev mailing list