mirror of
https://github.com/NixOS/nix.git
synced 2025-11-20 17:29:36 +01:00
* Support queryDeriver() in multi-user installations.
This commit is contained in:
parent
9d9e1c5c41
commit
6d1a1191b0
10 changed files with 42 additions and 16 deletions
|
|
@ -399,7 +399,7 @@ void setDeriver(const Transaction & txn, const Path & storePath,
|
|||
}
|
||||
|
||||
|
||||
Path queryDeriver(const Transaction & txn, const Path & storePath)
|
||||
static Path queryDeriver(const Transaction & txn, const Path & storePath)
|
||||
{
|
||||
if (!isRealisablePath(txn, storePath))
|
||||
throw Error(format("path `%1%' is not valid") % storePath);
|
||||
|
|
@ -411,6 +411,12 @@ Path queryDeriver(const Transaction & txn, const Path & storePath)
|
|||
}
|
||||
|
||||
|
||||
Path LocalStore::queryDeriver(const Path & path)
|
||||
{
|
||||
return nix::queryDeriver(noTxn, path);
|
||||
}
|
||||
|
||||
|
||||
const int substituteVersion = 2;
|
||||
|
||||
|
||||
|
|
@ -756,7 +762,7 @@ void LocalStore::exportPath(const Path & path, bool sign,
|
|||
nix::queryReferences(txn, path, references);
|
||||
writeStringSet(references, hashAndWriteSink);
|
||||
|
||||
Path deriver = queryDeriver(txn, path);
|
||||
Path deriver = nix::queryDeriver(txn, path);
|
||||
writeString(deriver, hashAndWriteSink);
|
||||
|
||||
if (sign) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue