aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/fs-accessor.hh
AgeCommit message (Collapse)Author
2020-12-15Use the fs accessor for readInvalidDerivationregnat
Extend `FSAccessor::readFile` to allow not checking that the path is a valid one, and rewrite `readInvalidDerivation` using this extended `readFile`. Several places in the code use `readInvalidDerivation`, either because they need to read a derivation that has been written in the store but not registered yet, or more generally to prevent a deadlock because `readDerivation` tries to lock the state, so can't be called from a place where the lock is already held. However, `readInvalidDerivation` implicitely assumes that the store is a `LocalFSStore`, which isn't always the case. The concrete motivation for this is that it's required for `nix copy --from someBinaryCache` to work, which is tremendously useful for the tests.
2019-09-22Shut up some warningsEelco Dolstra
(cherry picked from commit 99e8e58f2de9941353b47ed14fbe4ed76d635519)
2017-12-07nix ls-{nar,store}: Return offset of files in the NAR if knownEelco Dolstra
E.g. $ nix ls-store --json --recursive --store https://cache.nixos.org /nix/store/b0w2hafndl09h64fhb86kw6bmhbmnpm1-blender-2.79 \ | jq .entries.bin.entries.blender.narOffset 400
2016-02-25Add NAR / Store accessor abstractionEelco Dolstra
This is primary to allow hydra-queue-runner to extract files like "nix-support/hydra-build-products" from NARs in binary caches.