[Nix-dev] Problem with builder #1 - nix-shell and nix-build behave differently

Luca Bruno lethalman88 at gmail.com
Sat May 16 21:39:02 CEST 2015


Because you are only looking at your use case. Many use cases involve
having already an src and using nix-shell for getting in the dev
environment.

On Sat, May 16, 2015 at 6:56 PM, Daniel Hlynskyi <abcz2.uprola at gmail.com>
wrote:

> Why not? unpackPhase unpacks to current dir, why can't it switch to
> $sourceRoot?
> If I understand nix-shell right, it would be then possible to
>
> nix-shell --command "unpackPhase; configurePhase; buildPhase;"
>
> as kind of alias to nix-build. Currently you are required to cd as
> mentioned in wiki [https://nixos.org/wiki/Debugging_a_Nix_Package]
>
> As Tomasz Kontusz mentioned, the cd $sourceRoot is done between phases,
> which is unexpectable to me.
>
> 2015-05-14 14:10 GMT+00:00 Luca Bruno <lethalman88 at gmail.com>:
>
>> On 14/05/2015 15:58, Daniel Hlynskyi wrote:
>> > Then how does nix-build handle this? Is there some special hook "cd
>> > $sourceRoot" after unpackPhase? Why this hook is not added to nix-shell?
>> >
>> Because you may be in a different directory where nix-shell can cd
>> $sourceRoot? Those unpack & cd just don't apply to nix-shell.
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>
>
>


-- 
NixOS Linux <http://nixos.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150516/4670748d/attachment.html 


More information about the nix-dev mailing list