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 <[email protected]>:

> 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
> [email protected]
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to