-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Description
Describe the bug
I'm trying to build packages with cuda support on non-NixOS, and run tests during the nix-build. This requires exposing nvidia GPU devices such as /dev/nvidia0 to the check phase, which I'm trying to achieve with extra-sandbox-paths. Oddly, specifying --option extra-sandbox-paths ... works on the command-line, but fails when I specify the same option in ~/.config/nix/nix.conf:
error: while setting up the build environment: getting attributes of path '"/dev/nvidia0"': No such file or directory
Steps To Reproduce
- Works:
nix-build '<nixpkgs>' -A hello --check --option extra-sandbox-paths "/dev/tty0" - Fails:
nix-build '<nixpkgs>' -A hello --checkwith ~/.config/nix/nix.conf containing
extra-sandbox-paths = "/dev/tty0"
error: while setting up the build environment: getting attributes of path '"/dev/tty0"': No such file or directory
nix-env --version output
nix-env (Nix) 2.3.10