mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02:00
Add a storeFS accessor for paths resulting from IFD
Hopefully fixes #11503.
This commit is contained in:
parent
e5e0ce2334
commit
774b924398
4 changed files with 35 additions and 35 deletions
|
@ -250,6 +250,11 @@ public:
|
|||
*/
|
||||
const ref<SourceAccessor> rootFS;
|
||||
|
||||
/**
|
||||
* The accessor for the store.
|
||||
*/
|
||||
const ref<SourceAccessor> storeFS;
|
||||
|
||||
/**
|
||||
* The in-memory filesystem for <nix/...> paths.
|
||||
*/
|
||||
|
@ -389,6 +394,18 @@ public:
|
|||
*/
|
||||
SourcePath rootPath(PathView path);
|
||||
|
||||
/**
|
||||
* Convert `s` to a path. If `context` is not empty, the resulting
|
||||
* path will use the `storeFS` accessor; otherwise it will use
|
||||
* `rootFS`. When using a chroot store, this allows us to
|
||||
* distinguish between store paths resulting from
|
||||
* import-from-derivation and sources stored in the actual
|
||||
* /nix/store.
|
||||
*/
|
||||
SourcePath stringWithContextToPath(
|
||||
std::string_view s,
|
||||
const NixStringContext & context);
|
||||
|
||||
/**
|
||||
* Allow access to a path.
|
||||
*/
|
||||
|
@ -412,17 +429,6 @@ public:
|
|||
|
||||
void checkURI(const std::string & uri);
|
||||
|
||||
/**
|
||||
* When using a diverted store and 'path' is in the Nix store, map
|
||||
* 'path' to the diverted location (e.g. /nix/store/foo is mapped
|
||||
* to /home/alice/my-nix/nix/store/foo). However, this is only
|
||||
* done if the context is not empty, since otherwise we're
|
||||
* probably trying to read from the actual /nix/store. This is
|
||||
* intended to distinguish between import-from-derivation and
|
||||
* sources stored in the actual /nix/store.
|
||||
*/
|
||||
Path toRealPath(const Path & path, const NixStringContext & context);
|
||||
|
||||
/**
|
||||
* Parse a Nix expression from the specified file.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue