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