mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 12:06:01 +01:00
Give DerivationBuilder a LocalStore not Store
This is just more honest, since we downcasted it to `LocalStore` in many places. We had the downcast before because it wasn't needed in the hook case, just the local building case, but now that `DerivationBuilder` is separated and just does the building case, we have formalized the boundary where the single downcast should occur.
This commit is contained in:
parent
14e355d87d
commit
4bc9ae67c7
6 changed files with 24 additions and 34 deletions
|
|
@ -191,7 +191,7 @@ struct ChrootLinuxDerivationBuilder : ChrootDerivationBuilder, LinuxDerivationBu
|
|||
std::optional<Path> cgroup;
|
||||
|
||||
ChrootLinuxDerivationBuilder(
|
||||
Store & store, std::unique_ptr<DerivationBuilderCallbacks> miscMethods, DerivationBuilderParams params)
|
||||
LocalStore & store, std::unique_ptr<DerivationBuilderCallbacks> miscMethods, DerivationBuilderParams params)
|
||||
: DerivationBuilderImpl{store, std::move(miscMethods), std::move(params)}
|
||||
, ChrootDerivationBuilder{store, std::move(miscMethods), std::move(params)}
|
||||
, LinuxDerivationBuilder{store, std::move(miscMethods), std::move(params)}
|
||||
|
|
@ -492,7 +492,7 @@ struct ChrootLinuxDerivationBuilder : ChrootDerivationBuilder, LinuxDerivationBu
|
|||
createDirs(chrootRootDir + "/dev/shm");
|
||||
createDirs(chrootRootDir + "/dev/pts");
|
||||
ss.push_back("/dev/full");
|
||||
if (store.config.systemFeatures.get().count("kvm") && pathExists("/dev/kvm"))
|
||||
if (store.Store::config.systemFeatures.get().count("kvm") && pathExists("/dev/kvm"))
|
||||
ss.push_back("/dev/kvm");
|
||||
ss.push_back("/dev/null");
|
||||
ss.push_back("/dev/random");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue