mirror of
https://github.com/NixOS/nix
synced 2025-07-02 21:51:50 +02:00
Liberate checkDerivationOutputs
from LocalStore
Make it instead a method on `Derivation` that can work with any store. We will need this for a CLI command to create a derivation.
This commit is contained in:
parent
b200784cec
commit
4e9f32f993
4 changed files with 70 additions and 61 deletions
|
@ -333,6 +333,14 @@ struct Derivation : BasicDerivation
|
|||
Store & store,
|
||||
const std::map<std::pair<StorePath, std::string>, StorePath> & inputDrvOutputs) const;
|
||||
|
||||
/* Check that the derivation is valid and does not present any
|
||||
illegal states.
|
||||
|
||||
This is mainly a matter of checking the outputs, where our C++
|
||||
representation supports all sorts of combinations we do not yet
|
||||
allow. */
|
||||
void checkInvariants(Store & store, const StorePath & drvPath) const;
|
||||
|
||||
Derivation() = default;
|
||||
Derivation(const BasicDerivation & bd) : BasicDerivation(bd) { }
|
||||
Derivation(BasicDerivation && bd) : BasicDerivation(std::move(bd)) { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue