Hello all,
I have a situation where two seeming similar commands get different results:
$ cd ~/mydir
$ nix eval --raw ".mypackage"
/nix/store/cfr7lna3k4slvy3vk1z44b75jn33yrgj-mypackage-0.1.0
vs
$ nix eval --raw "path:///home/chris/mydir#mypackage"
/nix/store/mi7lmg4n45jnyi8ik422ynsk5srgyzwc-mypackage-0.1.0
This seems to be something to do with nix recognizing the directory as a git repo, in the first example - for example, I get this if working from within the directory, but not when dealing with the absolute path:
cd ~/mydir
nix path-info ".#mypackage" -vv
evaluating derivation 'git+file:///home/chris/mydir#mypackage'...
using revision 46b870de8add9099f39565de09f079dd0e56018d of repo '/home/chris/mydir'
I don’t understand, though, why these two would produce different hashes, and (if I have the straight choice between one versus the other) which one would be better to use.
Any help appreciated.
Chris