[Nix-dev] How much haskell do you like?

Marc Weber marco-oweber at gmx.de
Sun Aug 23 00:44:31 CEST 2009


I've kind of successfully patched cabal-install. However it can't
create an install plan for leksah right now. Anywya I don't think it's a
nice option for nix users having to do a:

cabal export-nix "list of pacakges " > file.nix

and include that file somehow?

pro: not much code is added to nixpkgs
con: you can't much packages without knowing about the trick above.
    Even if you do you have to recreate this file for each set of
    packages you'd like to use.

Alternative:
    Get the package descriptions from hackage into nix and write a nix
    planner doing some simple kind of dependency analysis.

  pro: You can assemble a set of dependencies as needed. This will look
        like this:

      myExecutable = makeCabalExecutable {
        buildDepends = planner 
          false # don't allow multiple versions ( true is a requirement to build leksha )
          [
          "bytestring"
           benchpress"
           "Unit"
           { n = "networking"; v = [1 2 0 0 ]; }
         ];
      };

    of course you don't write this list manually to build packages. The
    final version of the tool will let you add arbitrary cabal projects
    to the list of packages. But you'll use this
      planner false [ list of packages ]
    to build your user environment when developing packages.


  I prefer this way. However I also want to tell you that there are
  already 1500 packages on hackage and that creating a .nix file only
  containing the latest versions of a package and its dependency information
  is 1.2MB (text file). If you strip spaces and use shorter attr
  names you'll get around 700kb. Maybe you can shrink the file by using
  a dictionary lookup to lookup libary names.  Eg use 10 instead of
  "networking-bytestring". However I wonder whether there are other
  solutions such as list = import_gzipped hackage-list.nix.gz ?
  the gzipped file is about 180kb without having to invent a shorter
  encoding and its more readable.

Another direction could be splitting haskell off of nixpkgs and create
a new repo containing haskell stuff.
Right now nix is used by a couple of users. But if the user community
grows more and more people will be using more and more packages of
python, perl, ruby .. etc as well.


Note: I know that j-roen having been supervised by kosmikus was working
on a similar project. However I don't know when (whether at all?) this
work will be available. And I really want to have a solutions ASAP.


Another note: scion is working fine. So if you're keen on coding haskell
get it and enjoy background typechecking. The ThingaAtCursor feature is
useful as well.

Marc Weber



More information about the nix-dev mailing list