about summary refs log tree commit diff
path: root/src/libstore/nar-accessor.hh
AgeCommit message (Collapse)AuthorFilesLines
2017-12-16 Fix build on gcc 7Eelco Dolstra1-0/+2
Fixes #1738.
2017-12-07 Provide random access to cached NARsEelco Dolstra1-0/+10
E.g. $ time nix cat-store --store https://cache.nixos.org?local-nar-cache=/tmp/nars \ /nix/store/b0w2hafndl09h64fhb86kw6bmhbmnpm1-blender-2.79/share/icons/hicolor/scalable/apps/blender.svg > /dev/null real 0m4.139s $ time nix cat-store --store https://cache.nixos.org?local-nar-cache=/tmp/nars \ /nix/store/b0w2hafndl09h64fhb86kw6bmhbmnpm1-blender-2.79/share/icons/hicolor/scalable/apps/blender.svg > /dev/null real 0m0.024s (Before, the second call took ~0.220s.) This will use a NAR listing in /tmp/nars/b0w2hafndl09h64fhb86kw6bmhbmnpm1.ls containing all metadata, including the offsets of regular files inside the NAR. Thus, we don't need to read the entire NAR. (We do read the entire listing, but that's generally pretty small. We could use a SQLite DB by borrowing some more code from nixos-channel-scripts/file-cache.hh.) This is primarily useful when Hydra is serving files from an S3 binary cache, in particular when you have giant NARs. E.g. we had some 12 GiB NARs, so accessing individuals files was pretty slow.
2017-11-14 nix ls-{nar,store} --json: Respect -REelco Dolstra1-1/+4
2017-11-14 nix ls-{store,nar}: Add --json flagEelco Dolstra1-0/+4
2016-02-25 Add NAR / Store accessor abstractionEelco Dolstra1-0/+11
This is primary to allow hydra-queue-runner to extract files like "nix-support/hydra-build-products" from NARs in binary caches.