![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <derivation-builder-impl.hh>
Public Member Functions | |
| DerivationBuilderImpl (std::shared_ptr< BuildingStore > store, std::shared_ptr< DerivationBuilderCallbacks > miscMethods, DerivationBuilderParams params) | |
| SingleDrvOutputs | registerOutputs (LocalStore &localStore) override |
| SingleDrvOutputs | checkSubmittedOutputs (LocalStore &localStore) override |
| Public Member Functions inherited from nix::DerivationBuilder | |
| MuxablePipePollState::CommChannel | logChannel () |
| Descriptor | logDescriptor () |
| virtual std::optional< Descriptor > | startBuild ()=0 |
| virtual BuilderExit | unprepareBuild ()=0 |
| virtual void | cleanupBuild (bool force)=0 |
| virtual bool | killChild ()=0 |
| Public Member Functions inherited from nix::RestrictionContext | |
| virtual const StorePathSet & | originalPaths ()=0 |
| virtual bool | isAllowed (const StorePath &)=0 |
| virtual bool | isAllowed (const DrvOutput &id)=0 |
| bool | isAllowed (const DerivedPath &id) |
| virtual bool | shouldModifySandbox ()=0 |
| virtual void | submitOutput (const SingleDerivedPath &path, const OutputName &output)=0 |
| void | addDependency (const StorePath &path) |
Public Attributes | |
| Sync< OutputPathMap > | submittedOutputs |
| Public Attributes inherited from nix::DerivationBuilder | |
| AutoCloseFD | builderOut |
| Public Attributes inherited from nix::RestrictionContext | |
| Sync< State > | state_ |
| Public Attributes inherited from nix::DerivationBuilderParams | |
| const StorePath & | drvPath |
| BuildResult & | buildResult |
| const BasicDerivation & | drv |
| const DerivationOptions< StorePath > & | drvOptions |
| const StorePathSet & | inputPaths |
| const std::map< std::string, InitialOutput > | initialOutputs |
| const BuildMode & | buildMode |
| PathsInChroot | defaultPathsInChroot |
| StringSet | systemFeatures |
| DesugaredEnv | desugaredEnv |
Protected Types | |
| typedef std::map< StorePath, StorePath > | RedirectedOutputs |
Protected Member Functions | |
| virtual std::filesystem::path | realPathInHost (const StorePath &p) |
| Protected Member Functions inherited from nix::RestrictionContext | |
| virtual void | addDependencyImpl (const StorePath &path)=0 |
Protected Attributes | |
| Pid | pid |
| std::shared_ptr< BuildingStore > | store |
| std::shared_ptr< DerivationBuilderCallbacks > | miscMethods |
| std::filesystem::path | tmpDir |
| const derivation::Type | derivationType |
| const LocalSettings & | localSettings = store->getLocalSettings() |
| std::unique_ptr< UserLock > | buildUser |
| StringMap | inputRewrites |
| StringMap | outputRewrites |
| RedirectedOutputs | redirectedOutputs |
| OutputPathMap | scratchOutputs |
The state for building locally that does not depend on the platform, and registerOutputs, which every implementation ends with.
The platform-specific subclasses — UnixDerivationBuilderImpl and WindowsDerivationBuilderImpl — own everything about running the builder: sandboxing, build users, and recursive Nix are all Unix-only so far.
|
overridevirtual |
Check that the derivation outputs submitted by recursive-nix exist and attach them to the derivation.
Only used with builder-rpc-v0.
Implements nix::DerivationBuilder.
|
inlineprotectedvirtual |
Where an output path lives while the build runs.
Sandboxing can put it somewhere other than its final home, so this is a hook rather than just Store::toRealPath.
Reimplemented in nix::ChrootDerivationBuilder.
|
overridevirtual |
Check that the derivation outputs all exist and register them as valid.
Not used with builder-rpc-v0; see checkSubmittedOutputs.
References to other outputs. Built by looking up in scratchOutputsInverse.
Implements nix::DerivationBuilder.
|
protected |
User selected for running the builder.
|
protected |
The sort of derivation we are building.
Just a cached value, computed from drv.
|
protected |
The process ID of the builder.
|
protected |
The output paths used during the build.
| Sync<OutputPathMap> nix::DerivationBuilderImpl::submittedOutputs |
Output paths from the SubmitOutput store command
|
protected |
The temporary directory used for the build.