[Nix-dev] Somewhat broken nix-prefetch-git

Paul Colomiets paul at colomiets.name
Tue Jan 20 21:26:09 CET 2015


Hi,

I'm used to do:

nix-prefetch-git file://$(pwd)

And use this commit in some nix files. This helps test new revision of
some git repository without pushing it to public.

But since recently this workflow is broken. I can use nix-prefetch-git
but it doesn't help (the output from nix-rebuild):

exporting /home/user_name/repo_name (rev a259b) into
/nix/store/4nn7vd1nzsifiqx8cv64xyr6jqymm3qv-repo_name-a259b
Initialized empty Git repository in
/nix/store/4nn7vd1nzsifiqx8cv64xyr6jqymm3qv-repo_name-a259b/.git/
fatal: '/home/user_name/repo_name' does not appear to be a git repository
fatal: Could not read from remote repository.

This is because builders do not have access to user directory. Which
is a good thing.

What is broken is probably nix-prefetch-git which exports to
/nix/store/xxxxx-git-export, and builder expects another name (see
above). And this is probably related to this commit:
https://github.com/NixOS/nixpkgs/pull/5521/files.

Any ideas of how to restore this workflow?

-- 
Paul


More information about the nix-dev mailing list