mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
daemon: Add `--chroot-directory'.
* nix/nix-daemon/guix-daemon.cc (GUIX_OPT_CHROOT_DIR): New macro. (options): Add `--chroot-directory'. (parse_opt): Handle it.
This commit is contained in:
parent
07ab4bf1fc
commit
72ce03739e
1 changed files with 11 additions and 0 deletions
|
@ -58,6 +58,7 @@ builds derivations on behalf of its clients.";
|
||||||
#define GUIX_OPT_DISABLE_STORE_OPTIMIZATION 7
|
#define GUIX_OPT_DISABLE_STORE_OPTIMIZATION 7
|
||||||
#define GUIX_OPT_IMPERSONATE_LINUX_26 8
|
#define GUIX_OPT_IMPERSONATE_LINUX_26 8
|
||||||
#define GUIX_OPT_DEBUG 9
|
#define GUIX_OPT_DEBUG 9
|
||||||
|
#define GUIX_OPT_CHROOT_DIR 10
|
||||||
|
|
||||||
static const struct argp_option options[] =
|
static const struct argp_option options[] =
|
||||||
{
|
{
|
||||||
|
@ -72,6 +73,13 @@ static const struct argp_option options[] =
|
||||||
#ifndef HAVE_CHROOT
|
#ifndef HAVE_CHROOT
|
||||||
" (chroots are not supported in this configuration, so "
|
" (chroots are not supported in this configuration, so "
|
||||||
"this option has no effect)"
|
"this option has no effect)"
|
||||||
|
#endif
|
||||||
|
},
|
||||||
|
{ "chroot-directory", GUIX_OPT_CHROOT_DIR, "DIR", 0,
|
||||||
|
"Add DIR to the build chroot"
|
||||||
|
#ifndef HAVE_CHROOT
|
||||||
|
" (chroots are not supported in this configuration, so "
|
||||||
|
"this option has no effect)"
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
{ "build-users-group", GUIX_OPT_BUILD_USERS_GROUP, "GROUP", 0,
|
{ "build-users-group", GUIX_OPT_BUILD_USERS_GROUP, "GROUP", 0,
|
||||||
|
@ -104,6 +112,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
|
||||||
case GUIX_OPT_DISABLE_CHROOT:
|
case GUIX_OPT_DISABLE_CHROOT:
|
||||||
settings.useChroot = false;
|
settings.useChroot = false;
|
||||||
break;
|
break;
|
||||||
|
case GUIX_OPT_CHROOT_DIR:
|
||||||
|
settings.dirsInChroot.insert (arg);
|
||||||
|
break;
|
||||||
case GUIX_OPT_DISABLE_LOG_COMPRESSION:
|
case GUIX_OPT_DISABLE_LOG_COMPRESSION:
|
||||||
settings.compressLog = false;
|
settings.compressLog = false;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue