Mic92 / nixpkgs-review

Review pull-requests on https://github.com/NixOS/nixpkgs
MIT License
353 stars 59 forks source link

--sandbox flag prevents access to temporary nix file and makes shell fail #324

Closed symphorien closed 1 year ago

symphorien commented 1 year ago
$  nix-review pr --sandbox https://github.com/NixOS/nixpkgs/pull/222931
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/222931/head:refs/nixpkgs-review/1
$ git worktree add /home/symphorien/.cache/nixpkgs-review/pr-222931-1/nixpkgs 4111a96ea706035ec4486d370d7892b72d3f13bf
Préparation de l'arbre de travail (HEAD détachée 4111a96ea70)
Mise à jour des fichiers: 100% (34201/34201), fait.
HEAD est maintenant à 4111a96ea70 Merge pull request #222769 from IndeedNotJames/tempo
$ git merge --no-commit --no-ff 2292347fc7b416b793d4c170cb75af8cd65ba18c
La fusion automatique a réussi ; stoppée avant la validation comme demandé
$ nom build --extra-experimental-features nix-command no-url-literals --no-link --keep-going --no-allow-import-from-derivation --option build-use-sandbox relaxed -f /home/symphorien/.cache/nixpkgs-review/pr-222931-1/build.nix
Finished at 17:03:18 after 0s

Link to currently reviewing PR:
https://github.com/NixOS/nixpkgs/pull/222931

1 package built:
boxxy

Using sandbox mode. Some things may break!
$ /home/symphorien/.nix-profile/bin/bwrap --die-with-parent --unshare-cgroup --unshare-ipc --unshare-uts --ro-bind / / --dev-bind /dev /dev --dir /tmp --tmpfs /tmp --dev-bind-try /run/user/1000 /run/user/1000 --dir /home/symphorien --tmpfs /home/symphorien --bind /home/symphorien/src/nixpkgs /home/symphorien/src/nixpkgs --bind /home/symphorien/.cache/nixpkgs-review/pr-222931-1 /home/symphorien/.cache/nixpkgs-review/pr-222931-1 --ro-bind-try /home/symphorien/.config/nixpkgs /home/symphorien/.config/nixpkgs --ro-bind-try /tmp/.X11-unix /tmp/.X11-unix --ro-bind-try /home/symphorien/.Xauthority /home/symphorien/.Xauthority --ro-bind-try /home/symphorien/.config/hub /home/symphorien/.config/hub --ro-bind-try /home/symphorien/.config/gh /home/symphorien/.config/gh -- /run/current-system/sw/bin/nom-shell /home/symphorien/.cache/nixpkgs-review/pr-222931-1/shell.nix
error: getting status of '/tmp/tmpvxlyq4z5.nix': No such file or directory

$ git worktree prune

nix-review pr https://github.com/NixOS/nixpkgs/pull/222931 works on the other hand.

nix-review 2.9.0 from nixos-unstable

symphorien commented 1 year ago

setting TMPDIR=/run/user/1000 make the shell work.

figsoda commented 1 year ago

325