[Nix-dev] A Journey into the Haskell NG infrastructure: Part I

Thomas Hunger tehunger at gmail.com
Fri Jan 9 23:27:59 CET 2015


One thing that'd be useful is documenting how
pkgs/development/haskell-modules/hackage-packages.nix is regenerated and
how to fix common issues.

E.g. disabling tests done by overriding a package in
haskell-modules/configuration-common.nix. But I don't understand how to
retain a specific version of a package (e.g. you have time_1_5_0_1 in
there, how did you do that?).

~

On 9 January 2015 at 18:11, Peter Simons <simons at cryp.to> wrote:

> Hi Thomas,
>
>  > I changed my sandbox code to look like the following. Is that how it's
>  > intended to be used?
>
> yes, exactly. That's a very nice example. You can put that definition into
> a
> file, say shell.nix, and run
>
>   $ nix-shell --pure shell.nix
>
> to obtain an interactive environment that contains the compiler defined
> above.
>
> If you want to go all out, you can also add a "shellHook" attribute to make
> nix-shell define the magic environment variables that tell the 'ghc-paths'
> package how to use your environment. For example:
>
>  | { pkgs ? (import <nixpkgs> {}).pkgs }:
>  |
>  | let
>  |
>  |   env = pkgs.haskellngPackages.ghcWithPackages (p: with p; [
>  |     text mtl transformers warp cabal-install
>  |   ]);
>  |
>  | in
>  |
>  | pkgs.stdenv.mkDerivation {
>  |   name = "hello-world-wide-web";
>  |   buildInputs = [ env ];
>  |   shellHook = ''
>  |     export NIX_GHC="${env}/bin/ghc"
>  |     export NIX_GHCPKG="${env}/bin/ghc-pkg"
>  |     export NIX_GHC_DOCDIR="${env}/share/doc/ghc/html"
>  |     export NIX_GHC_LIBDIR=$( $NIX_GHC --print-libdir )
>  |   '';
>  | }
>
> Best regards,
> Peter
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150109/48886c6e/attachment.html 


More information about the nix-dev mailing list