Nix
`.narinfo` Format
.narinfo Format
A .narinfo file contains the metadata of a store object in the binary cache format.
It is a simple line-oriented format where each line is a Key: Value pair.
Some keys (e.g. Sig) may appear multiple times.
The file is named <hash>.narinfo, where <hash> is the hash part of the store object's store path.
The fields correspond to those documented in the store object info JSON format:
.narinfo field |
JSON field | Differences |
|---|---|---|
StorePath |
path |
Full store path rather than store path base name |
URL |
url |
|
Compression |
compression |
Defaults to bzip2 if omitted |
FileHash |
downloadHash |
String-encoded hash rather than structured |
FileSize |
downloadSize |
|
NarHash |
narHash |
String-encoded hash rather than structured |
NarSize |
narSize |
|
References |
references |
Space-separated store path base names rather than a JSON array |
Deriver |
deriver |
Store path base name; unknown-deriver instead of null |
Sig |
signatures |
May appear multiple times rather than using an array |
CA |
ca |
String-encoded content address rather than structured |
Example
StorePath: /nix/store/n5wkd9frr45pa74if5gpz9j7mifg27fh-foo
URL: nar/1w1fff338fvdw53sqgamddn1b2xgds473pv6y13gizdbqjv4i5p3.nar.xz?sha256=1w1fff338fvdw53sqgamddn1b2xgds473pv6y13gizdbqjv4i5p3
Compression: xz
FileHash: sha256:09ymwqf5i9q7d4dm7x4pjjcqqj0qrcp5lnznbh42gfsci5hcbqqm
FileSize: 4029176
NarHash: sha256:09ymwqf5i9q7d4dm7x4pjjcqqj0qrcp5lnznbh42gfsci5hcbqqm
NarSize: 34878
References: g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-bar n5wkd9frr45pa74if5gpz9j7mifg27fh-foo
Deriver: g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-bar.drv
Sig: asdf:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
Sig: qwer:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
CA: fixed:r:sha256:1lr187v6dck1rjh2j6svpikcfz53wyl3qrlcbb405zlh13x0khhh