Chris Marusich writes: > ludo@gnu.org (Ludovic Courtès) writes: > >> Hi Chris, >> >> Chris Marusich skribis: >> >>> The manual says ((guix) Invoking guix system) that the options to 'guix >>> system' "can contain any of the common build options". Although some >>> common build options (e.g. '--fallback') do seem to work, I have noticed >>> that the '--root' option does not. Consider the following: >> >> That’s because ‘--root’ is not a “common build option” in the sense of >> "(guix) Common Build Options". :-) >> >> That said, I agree we should either make it a common option (i.e., add >> it to ‘%standard-build-options’ in (guix scripts build)) or add it >> explicitly to ‘guix system’. The latter may be simpler. >> >> Thoughts? > > As long as 'guix system' will create an indirect gc root as expected, > regardless of whether '--root' was specified in the environment variable > for build options or as a command-line option for the 'guix system' > command, adding it explicitly to 'guix system' seems OK to me. > > I'll see if I can submit a patch later this week. I've attached a small patch series which adds support. Please let me know what you think. (If you prefer that I send the patches to you via some other email list or something, please let me know.) I've verified manually that the patches fix the issue. For example: --8<---------------cut here---------------start------------->8--- $ GUIX_BUILD_OPTIONS='--root=my-indirect-root' ./pre-inst-env guix system disk-image ~/guix/gnu/system/install.scm /gnu/store/qr83vk7lifm63jscrv1gfqzj80zwkmca-disk-image $ ls -l | grep indir lrwxrwxrwx 1 marusich users 54 Apr 3 23:44 my-indirect-root -> /gnu/store/qr83vk7lifm63jscrv1gfqzj80zwkmca-disk-image $ ls -l /var/guix/gcroots/auto/ | grep indir lrwxrwxrwx 1 root root 36 Apr 3 23:44 wk6bx8f7xjq8ab7dz683n64ly21dyw8x -> /home/marusich/guix/my-indirect-root --8<---------------cut here---------------end--------------->8--- It works the same when I pass the option directly on the command line as '--root=foo' or '-r foo', too. -- Chris