When go2nix invokes nix-prefetch-git, it fails because nix can’t access the nix-daemon:
→ go2nix save
2018/04/10 17:56:06 Initialized empty Git repository in /tmp/git-checkout-tmp-2emNcsso/payment-processors/.git/
From file:///home/philip/.go/src/gitlab.techcultivation.org/sangha/payment-processors
* branch HEAD -> FETCH_HEAD
Switched to a new branch 'fetchgit'
removing `.git'...
error: Nix database directory ‘/nix/var/nix/db’ is not writable: Permission denied
2018/04/10 17:56:06 Command /nix/store/sgzjh8gbvx2r9lsbzjycmi1n9gfgbn8a-nix-prefetch-git/bin/nix-prefetch-git [nix-prefetch-git --fetch-submodules file:///home/philip/.go/src/gitlab.techcultivation.org/sangha/payment-processors] failed: exit status 1
When I set NIX_REMOTE, it works:
→ env NIX_REMOTE=daemon go2nix save
→
This is quite strange, because nix 2.0 shouldn’t need a set NIX_REMOTE to work properly. Even stranger, when I run the failing nix-prefetch-git command directly in my shell, it works:
When
go2nix
invokesnix-prefetch-git
, it fails because nix can’t access the nix-daemon:When I set
NIX_REMOTE
, it works:This is quite strange, because nix
2.0
shouldn’t need a setNIX_REMOTE
to work properly. Even stranger, when I run the failingnix-prefetch-git
command directly in my shell, it works:cc @aszlig