Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
chroot.hh File Reference
#include <filesystem>
#include <map>
#include <memory>
#include <functional>

Go to the source code of this file.

Classes

struct  nix::BuildChrootParams

Functions

std::pair< std::filesystem::path, AutoDelete > nix::setupBuildChroot (const BuildChrootParams &params)

Function Documentation

◆ setupBuildChroot()

std::pair< std::filesystem::path, AutoDelete > nix::setupBuildChroot ( const BuildChrootParams & params)

Set up a chroot build environment.

Creates the chroot directory structure and sets up necessary directories (/tmp, /etc, store directory). Returns the chroot root path and an AutoDelete that will clean up the chroot directory when destroyed.

Parameters
paramsParameters for chroot setup
Returns
Pair of (chroot root path, cleanup object)