From fa53fbe086d720998709428f944ef682c6944f6d Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sun, 11 Oct 2015 17:53:03 +0300 Subject: [PATCH] build-fhs-{chroot,user}env: document new extra bind mounts option --- doc/functions.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/functions.xml b/doc/functions.xml index 5378b59abcb..39010f8ab14 100644 --- a/doc/functions.xml +++ b/doc/functions.xml @@ -236,6 +236,20 @@ c = lib.makeOverridable f { a = 1; b = 2; } runScript parameter, which is a command that would be executed inside the sandbox and passed all the command line arguments. It default to bash. + + + It also uses CHROOTENV_EXTRA_BINDS environment variable + for binding extra directories in the sandbox to outside places. The format of + the variable is /mnt=test-mnt:/data, where + /mnt would be mounted as /test-mnt + and /data would be mounted as /data. + extraBindMounts array argument to + buildFHSUserEnv function is prepended to this variable. + Latter entries take priority if defined several times -- i.e. in case of + /data=data1:/data=data2 the actual bind path would be + /data2. + + One can create a simple environment using a shell.nix like that: