[Nix-dev] unequal build hash

Guillaume Maudoux (Layus) layus.on at gmail.com
Fri Jul 7 11:56:33 CEST 2017



On 07/07/17 10:28, Harmen via nix-dev wrote:
> On Fri, Jul 07, 2017 at 07:59:46AM +0200, Vladimír Čunát wrote:
>> On 07/06/2017 07:35 PM, Harmen via nix-dev wrote:
>>> Does that makes sense? Did I forget a 'name' somewhere?
>> When you use things like
>>    src = ./.;
>> the directory gets copied into nix store and the resulting path's name
>> is based on the name of the directory.
> I see. That was rather unobvious and unexpected to me.
>
> Anyone knows a (creative) way around that? I would like to have it build code
> from ./., but where the name of the directory you happened to have checked the
> project out in doesn't matter (because then the binary cache works).
Well, you could try to play with symlinks. A self-symlinks seems to be 
enough.

git checkout ... somewhere
cd somewhere
ln -s . knownName

then

src = builtins.filterSource (path: type: path != "./knownName") ./knownName; # syntax my not be correct here, check by yourself :-).


-- Layus.


More information about the nix-dev mailing list