Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
chroot-derivation-builder.hh
1#pragma once
2
3#include "unix-derivation-builder-impl.hh"
4#include "chroot.hh"
5
6namespace nix {
7
8struct ChrootDerivationBuilder : virtual UnixDerivationBuilderImpl
9{
10private:
11 void anchor() override;
12public:
13 ChrootDerivationBuilder(
14 std::shared_ptr<BuildingStore> store,
15 std::shared_ptr<DerivationBuilderCallbacks> miscMethods,
17 : UnixDerivationBuilderImpl{store, std::move(miscMethods), std::move(params)}
18 {
19 }
20
24 std::filesystem::path chrootRootDir;
25
29 std::optional<AutoDelete> autoDelChroot;
30
31 PathsInChroot pathsInChroot;
32
33 inline bool needsHashRewrite() override
34 {
35 return false;
36 }
37
38 void setBuildTmpDir() override;
39
40 std::filesystem::path tmpDirInSandbox() override;
41
42 virtual gid_t sandboxGid();
43
44 void prepareSandbox() override;
45
46 Strings getPreBuildHookArgs() override;
47
48 std::filesystem::path realPathInHost(const StorePath & p) override;
49
50 void cleanupBuild(bool force) override;
51
52 std::pair<std::filesystem::path, std::filesystem::path> addDependencyPrep(const StorePath & path);
53};
54
55} // namespace nix
Definition path.hh:33
Definition unix-derivation-builder-impl.hh:25
std::filesystem::path tmpDirInSandbox() override
Definition chroot-derivation-builder.cc:20
std::optional< AutoDelete > autoDelChroot
Definition chroot-derivation-builder.hh:29
std::filesystem::path realPathInHost(const StorePath &p) override
Definition chroot-derivation-builder.cc:79
void prepareSandbox() override
Definition chroot-derivation-builder.cc:32
std::filesystem::path chrootRootDir
Definition chroot-derivation-builder.hh:24
bool needsHashRewrite() override
Definition chroot-derivation-builder.hh:33
void cleanupBuild(bool force) override
Definition chroot-derivation-builder.cc:86
Definition derivation-builder.hh:77