3
0
Fork 0
forked from mirrors/nixpkgs

* 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
This commit is contained in:
Andres Löh 2009-04-20 14:23:50 +00:00
parent ff894ae773
commit 035d7cb965
4 changed files with 22 additions and 31 deletions

View file

@ -54,7 +54,7 @@ attrs :
for i in Setup.hs Setup.lhs; do for i in Setup.hs Setup.lhs; do
test -f $i && ghc --make $i test -f $i && ghc --make $i
done done
./Setup configure --verbose --prefix="$out" ./Setup configure --verbose --prefix="$out" $configureFlags
eval "$postConfigure" eval "$postConfigure"
''; '';
@ -70,10 +70,7 @@ attrs :
# installs via Cabal; creates a registration file for nix-support # installs via Cabal; creates a registration file for nix-support
# so that the package can be used in other Haskell-builds; also # so that the package can be used in other Haskell-builds; also
# creates a register-${name}.sh in userspace that can be used to # adds all propagated build inputs to the user environment packages
# register the library in a user environment (but this scheme
# should sooner or later be deprecated in favour of using a
# ghc-wrapper).
installPhase = '' installPhase = ''
eval "$preInstall" eval "$preInstall"
@ -82,6 +79,9 @@ attrs :
local confDir=$out/lib/ghc-pkgs/ghc-${attrs.ghc.ghc.version} local confDir=$out/lib/ghc-pkgs/ghc-${attrs.ghc.ghc.version}
ensureDir $confDir ensureDir $confDir
./Setup register --gen-pkg-config=$confDir/${self.fname}.conf ./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" eval "$postInstall"
''; '';

View file

@ -1,6 +1,6 @@
{cabal, fetchurl, GLUT, HTTP, HUnit, OpenAL, OpenGL, QuickCheck, cgi, fgl, {cabal, fetchurl, GLUT, HTTP, HUnit, OpenAL, OpenGL, QuickCheck, cgi, fgl,
haskellSrc, html, parallel, regexBase, regexCompat, regexPosix, 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 : { cabal.mkDerivation (self : {
pname = "haskell-platform"; pname = "haskell-platform";
@ -20,13 +20,8 @@ cabal.mkDerivation (self : {
propagatedBuildInputs = [ propagatedBuildInputs = [
GLUT HTTP HUnit OpenAL OpenGL QuickCheck cgi fgl GLUT HTTP HUnit OpenAL OpenGL QuickCheck cgi fgl
haskellSrc html parallel regexBase regexCompat regexPosix 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 = { meta = {
description = "Haskell Platform meta package"; description = "Haskell Platform meta package";
}; };

View file

@ -1,26 +1,21 @@
{stdenv, fetchurl, tetex, polytable, ghc}: {cabal, tetex, polytable, regexCompat, utf8String}:
assert tetex == polytable.tetex; assert tetex == polytable.tetex;
stdenv.mkDerivation { cabal.mkDerivation (self : {
name = "lhs2tex-1.13"; pname = "lhs2tex";
version = "1.14";
src = fetchurl { name = self.fname;
url = "http://people.cs.uu.nl/andres/lhs2tex/lhs2tex-1.13.tar.gz"; sha256 = "1667acce394a0d4852f8ad07fa85397e43873fd98a219db794e4773883288687";
sha256 = "28282cb4afcc71785b092d358ffb33f5ec7585e50b392ae4fb6391d495a0836b"; extraBuildInputs = [tetex regexCompat utf8String];
}; propagatedBuildInputs = [polytable]; # automatically in user-env now with cabal
buildInputs = [tetex ghc]; configureFlags = ''--constraint=base<4'';
propagatedBuildInputs = [polytable];
propagatedUserEnvPackages = [polytable];
postInstall = '' postInstall = ''
ensureDir "$out/share/doc/$name" ensureDir "$out/share/doc/$name"
cp doc/Guide2.pdf $out/share/doc/$name cp doc/Guide2.pdf $out/share/doc/$name
ensureDir "$out/nix-support" ensureDir "$out/nix-support"
echo "$propagatedUserEnvPackages" > $out/nix-support/propagated-user-env-packages
''; '';
})
inherit tetex;
}

View file

@ -78,6 +78,7 @@ rec {
inherit cabal GLUT HTTP HUnit OpenAL OpenGL QuickCheck cgi fgl inherit cabal GLUT HTTP HUnit OpenAL OpenGL QuickCheck cgi fgl
haskellSrc html parallel regexBase regexCompat regexPosix haskellSrc html parallel regexBase regexCompat regexPosix
stm time xhtml zlib cabalInstall alex happy haddock; stm time xhtml zlib cabalInstall alex happy haddock;
ghc = ghcReal;
inherit (pkgs) fetchurl; inherit (pkgs) fetchurl;
}; };
@ -191,7 +192,7 @@ rec {
inherit cabal; inherit cabal;
}; };
utf8_string = import ../development/libraries/haskell/utf8-string { utf8String = import ../development/libraries/haskell/utf8-string {
inherit cabal; inherit cabal;
}; };
@ -302,7 +303,7 @@ rec {
}; };
leksah = import ../applications/editors/leksah { leksah = import ../applications/editors/leksah {
inherit cabal gtk2hs binary parsec regexPosix utf8_string; inherit cabal gtk2hs binary parsec regexPosix utf8String;
inherit (pkgs) libedit makeWrapper; inherit (pkgs) libedit makeWrapper;
}; };
@ -327,8 +328,8 @@ rec {
}; };
lhs2tex = import ../tools/typesetting/lhs2tex { lhs2tex = import ../tools/typesetting/lhs2tex {
inherit ghc; inherit cabal regexCompat utf8String;
inherit (pkgs) fetchurl stdenv tetex polytable; inherit (pkgs) tetex polytable;
}; };
} }