From 035d7cb965be41a8986fc0ac72f60d63eb3abf43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andres=20L=C3=B6h?= Date: Mon, 20 Apr 2009 14:23:50 +0000 Subject: [PATCH] * Updated lhs2TeX. * Propagated build inputs of Haskell pkgs are now automatically propagated user-env pkgs. * Updated haskell-platform slightly. svn path=/nixpkgs/trunk/; revision=15184 --- .../libraries/haskell/cabal/cabal.nix | 10 ++++---- .../haskell/haskell-platform/default.nix | 9 ++----- pkgs/tools/typesetting/lhs2tex/default.nix | 25 ++++++++----------- pkgs/top-level/haskell-packages.nix | 9 ++++--- 4 files changed, 22 insertions(+), 31 deletions(-) diff --git a/pkgs/development/libraries/haskell/cabal/cabal.nix b/pkgs/development/libraries/haskell/cabal/cabal.nix index 0c976ca23220..263eaec63058 100644 --- a/pkgs/development/libraries/haskell/cabal/cabal.nix +++ b/pkgs/development/libraries/haskell/cabal/cabal.nix @@ -54,7 +54,7 @@ attrs : for i in Setup.hs Setup.lhs; do test -f $i && ghc --make $i done - ./Setup configure --verbose --prefix="$out" + ./Setup configure --verbose --prefix="$out" $configureFlags eval "$postConfigure" ''; @@ -70,10 +70,7 @@ attrs : # installs via Cabal; creates a registration file for nix-support # so that the package can be used in other Haskell-builds; also - # creates a register-${name}.sh in userspace that can be used to - # register the library in a user environment (but this scheme - # should sooner or later be deprecated in favour of using a - # ghc-wrapper). + # adds all propagated build inputs to the user environment packages installPhase = '' eval "$preInstall" @@ -82,6 +79,9 @@ attrs : local confDir=$out/lib/ghc-pkgs/ghc-${attrs.ghc.ghc.version} ensureDir $confDir ./Setup register --gen-pkg-config=$confDir/${self.fname}.conf + + ensureDir $out/nix-support + ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages eval "$postInstall" ''; diff --git a/pkgs/development/libraries/haskell/haskell-platform/default.nix b/pkgs/development/libraries/haskell/haskell-platform/default.nix index 88aea6e1d396..4bf660c684f0 100644 --- a/pkgs/development/libraries/haskell/haskell-platform/default.nix +++ b/pkgs/development/libraries/haskell/haskell-platform/default.nix @@ -1,6 +1,6 @@ {cabal, fetchurl, GLUT, HTTP, HUnit, OpenAL, OpenGL, QuickCheck, cgi, fgl, haskellSrc, html, parallel, regexBase, regexCompat, regexPosix, - stm, time, xhtml, zlib, cabalInstall, alex, happy, haddock}: + stm, time, xhtml, zlib, cabalInstall, alex, happy, haddock, ghc}: cabal.mkDerivation (self : { pname = "haskell-platform"; @@ -20,13 +20,8 @@ cabal.mkDerivation (self : { propagatedBuildInputs = [ GLUT HTTP HUnit OpenAL OpenGL QuickCheck cgi fgl haskellSrc html parallel regexBase regexCompat regexPosix - stm time xhtml zlib cabalInstall alex happy + stm time xhtml zlib cabalInstall alex happy ghc ]; - /* - postFixup = '' - ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages - ''; - */ meta = { description = "Haskell Platform meta package"; }; diff --git a/pkgs/tools/typesetting/lhs2tex/default.nix b/pkgs/tools/typesetting/lhs2tex/default.nix index c4fe10026dd8..f5bbb572504e 100644 --- a/pkgs/tools/typesetting/lhs2tex/default.nix +++ b/pkgs/tools/typesetting/lhs2tex/default.nix @@ -1,26 +1,21 @@ -{stdenv, fetchurl, tetex, polytable, ghc}: +{cabal, tetex, polytable, regexCompat, utf8String}: assert tetex == polytable.tetex; -stdenv.mkDerivation { - name = "lhs2tex-1.13"; - - src = fetchurl { - url = "http://people.cs.uu.nl/andres/lhs2tex/lhs2tex-1.13.tar.gz"; - sha256 = "28282cb4afcc71785b092d358ffb33f5ec7585e50b392ae4fb6391d495a0836b"; - }; +cabal.mkDerivation (self : { + pname = "lhs2tex"; + version = "1.14"; + name = self.fname; + sha256 = "1667acce394a0d4852f8ad07fa85397e43873fd98a219db794e4773883288687"; + extraBuildInputs = [tetex regexCompat utf8String]; + propagatedBuildInputs = [polytable]; # automatically in user-env now with cabal - buildInputs = [tetex ghc]; - propagatedBuildInputs = [polytable]; - propagatedUserEnvPackages = [polytable]; + configureFlags = ''--constraint=base<4''; postInstall = '' ensureDir "$out/share/doc/$name" cp doc/Guide2.pdf $out/share/doc/$name ensureDir "$out/nix-support" - echo "$propagatedUserEnvPackages" > $out/nix-support/propagated-user-env-packages ''; - - inherit tetex; -} +}) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index f044d5f1247c..396c895b237b 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -78,6 +78,7 @@ rec { inherit cabal GLUT HTTP HUnit OpenAL OpenGL QuickCheck cgi fgl haskellSrc html parallel regexBase regexCompat regexPosix stm time xhtml zlib cabalInstall alex happy haddock; + ghc = ghcReal; inherit (pkgs) fetchurl; }; @@ -191,7 +192,7 @@ rec { inherit cabal; }; - utf8_string = import ../development/libraries/haskell/utf8-string { + utf8String = import ../development/libraries/haskell/utf8-string { inherit cabal; }; @@ -302,7 +303,7 @@ rec { }; leksah = import ../applications/editors/leksah { - inherit cabal gtk2hs binary parsec regexPosix utf8_string; + inherit cabal gtk2hs binary parsec regexPosix utf8String; inherit (pkgs) libedit makeWrapper; }; @@ -327,8 +328,8 @@ rec { }; lhs2tex = import ../tools/typesetting/lhs2tex { - inherit ghc; - inherit (pkgs) fetchurl stdenv tetex polytable; + inherit cabal regexCompat utf8String; + inherit (pkgs) tetex polytable; }; }