Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

.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 fieldJSON fieldDifferences
StorePathpathFull store path rather than store path base name
URLurl
CompressioncompressionDefaults to bzip2 if omitted
FileHashdownloadHashString-encoded hash rather than structured
FileSizedownloadSize
NarHashnarHashString-encoded hash rather than structured
NarSizenarSize
ReferencesreferencesSpace-separated store path base names rather than a JSON array
DeriverderiverStore path base name; unknown-deriver instead of null
SigsignaturesMay appear multiple times rather than using an array
CAcaString-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