[Nix-dev] Haskell-env (via nix-shell) - am I doing this right?

Matthias Beyer mail at beyermatthias.de
Thu May 21 20:37:48 CEST 2015


Hi,

I want to develop a haskell package, but I need haskell packages from
haskellngPackages (what's the matter with haskellPackages vs.
haskellngPackages?).

So, I'm a bit insecure about my environment definition here, because I
had to mix the non-ng-packages with the ng-packages to get the
cabalInstall and everything (I'm rather new to Haskell, so maybe I
completely messed up here.

Here goes my default.nix:


    { pkgs ? (import <nixpkgs> {})
    , haskellPackages ? pkgs.haskellPackages_ghc784 }:

    haskellPackages.cabal.mkDerivation (self: {
        pname = "foobar";
        version = "0.0.0.0";

        src = ./.;

        isLibrary = false;
        isExecutable = true;

        buildDepends = with pkgs.haskellngPackages; [
          pkgs.stdenv
          haskellPackages.cabalInstall
          hlint

          snap
          snap-core
          snap-server

          snaplet-persistent

          persistent
          persistent-postgresql
          persistent-sqlite

          # maybe later:

          # rest-snap
          # aeson

          # snap-extras
          # snaplet-hslogger
        ];

        testDepends = with haskellPackages; [ ];

        meta = {
            # not relevant I guess
        };
    })

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150521/bfc6390c/attachment.bin 


More information about the nix-dev mailing list