[Nix-dev] Using sudo in builds?

Michael Raskin 7c6f434c at mail.ru
Fri May 6 13:47:40 CEST 2016


>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.





More information about the nix-dev mailing list