[Nix-dev] [Haskell NG] Equivalent of the old eval "$configurePhase" && eval "$buildPhase" && eval "$checkPhase" ?

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Fri Jan 23 01:24:56 CET 2015


On 01/22/2015 09:54 PM, Peter Simons wrote:
> Hi Mateusz,
> 
>  > What's the new in-shell workflow?
> 
> Does http://permalink.gmane.org/gmane.linux.distributions.nixos/15524 help?
> 
> Best regards,
> Peter
> 
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
> 

Yes though it seems that we now need to update two files when making any
changes: default.nix so that we can callPackage it in overrides and such
(for example if it's a private package) and shell.nix so that we can
enter sane environment.

Previously we could simply cabal2nix into default.nix and from shell.nix
callPackage ./. in simple case or add any extra shell-only settings in
there. Now it seems that if I add a dependency I need to regenerate both
files which is not fun if we have written any customisation. Am I wrong?

Nevetheless, I got on fine once I figured out I need a fancier shell.nix
such as one cabal2nix gave me. Another downside is that manual use of
Setup won't inherit flags specified in the expression: we manually have
to --enable-testsuite whereas eval "$configurePhase" would do that for
use when doCheck = true;. So overall it seems to me that there is a bit
more manual work involved though things seem nicer in general so far.

-- 
Mateusz K.


More information about the nix-dev mailing list