[Nix-dev] Using sudo in builds?

Domen Kožar domen at dev.si
Tue May 17 10:27:56 CEST 2016


Managed to find a way, posting for posterity:
https://github.com/snabblab/snabblab-nixos/commit/eb69d671dabedec4e32af225f65cfa563a215dd3

On Fri, May 6, 2016 at 12:47 PM, Michael Raskin <7c6f434c at mail.ru> wrote:

> >first of all some background. I'm working with Snabb (user-space
> networking
> >driver) and we have a special need of running some tests in qemu that
> >require pci-assign capabilities that can only be done as run. As a result,
> >we run qemu as root.
> >
> >Currently I'm running our tests without chroot (relaxed mode), but I'd
> like
> >to go back for determinism and be able to use sudo in chroot builds.
> >
> >Has anyone done that yet? Asking not to repeat already done work, my
> >current plan is trying the following:
> >
> >https://github.com/snabblab/snabblab-nixos/issues/33
>
> I would add /var/setuid-wrappers and the sudo store path to the list of
> chroot directories.
>
> You do get some amount of indeterminism in the sense that you use the
> system sudo  instead of buildInput sudo, but I would call that
> acceptable.
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160517/d60edaee/attachment.html 


More information about the nix-dev mailing list