Excerpts from Juan Daugherty's message of Sun Aug 07 18:30:09 +0200 2011:
> I built leksah yesterday from scratch on debian 6 after being unable to do
> so earlier on deb 5. I was surprised how many dependencies there were on
> ghc6 and ghc6 plgs and how much ad hackery was necessary to get the
> app built.
Well, the cabal file says ghc < 7.1 ...
Anyway its a nice sample to illustrate what's going on:
summary: I didn't finish updating leksah because it would require me
updating gtksourceview which probably would require me updating gnome,
which could take a couple of hours or more.

HACK-NIX
============

http://dpaste.com/588859/

Its easy to see whatever hack-nix tries it fails at haddock.
looking at its cabal file its clear why:
I force ghc-6.12.x and most recent haddock requires ghc >= 7.x
So the (first) fix is to add haddock-2.8.1 to the pool and run hack-nix without
arguments.

Next run is successful and the build starts.

Second Failure:
    Setup: The program alex is required but it could not be found builder for
    `/nix/store/q419iwglqlgxvywjs59d2yy450yrajvc-haddock-2.8.1.drv' failed; 
keeping build directory
    `/tmp/nix-build-q419iwglqlgxvywjs59d2yy450yrajvc-haddock-2.8.1.drv-0'

So the fix is to pass alex, happy to haddock because there is no way
to tell cabal that an app requires alex,happy,... (there is a bug report
though).

3rd Failure (adding gtk2hsBuildToolsFixed, pkgconfig to gktsourceview2)

4th Failure: Not updating gtksourceview (gtk library) which would be
required because headers are missing. The headers are not contained in sources. 
So I'm stopping because I don't want to update gnome at this time :(

compared to cabal-packages.nix
==============================
first attempt: -iA haskellPackages.leksah:

    Configuring process-leksah-1.0.1.3...
    Setup: At least the following dependencies are missing:
    directory ==1.0.*, filepath ==1.1.*

second attempt haskellPackages_ghc6123.leksah

  Configuring ltk-0.8.0.8...
  Setup: At least the following dependencies are missing:
  glib >=0.10.0 && <0.12, gtk >=0.10.0 && <0.12

And at this point I stop, cause I fear getting lost in managing
dependencies manually. That's why I wrote hack-nix. Probably it can be
easily fixed. The final issue will be gktsourceview anyway.

Replying to your additional statements:
> I'm glad to see this is being talked about and hopefully eventually
> addressed in the large, i.e. the issue of lang specific pkg managers
> running under Nix (gems, cabal, pear, whatever).
Well -  we have to discuss how such a solution should look like. I
already mentioned that you eventually don't want 50.000 package
description on disk if you use only 10 of them.
Also we're far from packaging Eclipse plugins for instance.

> I wouldn't want to try build leksah on NIxOS 
Its packaged. So it would have been much easier than using Debian!
Well - after figuring out that you have to use haskellPackages_ghc6*
instead of the default (7.0.2).

> a desktop on NixOS anyway.
You should make a difference between nixos and nixpkgs. nixpkgs can be
used without NixOS on any system (eg debian). And we're talking about
packages (similar to nixpkgs here, not the OS)

Marc Weber
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev

Reply via email to