* converted happy and haddock to use generic Cabal builder

svn path=/nixpkgs/trunk/; revision=10252
This commit is contained in:
Andres Löh
2008-01-22 21:10:19 +00:00
parent 67eb3a64e2
commit 84e7b463f5
4 changed files with 25 additions and 53 deletions

View File

@@ -1,25 +1,11 @@
{stdenv, fetchurl, ghc}:
{cabal}:
stdenv.mkDerivation (rec {
cabal.mkDerivation (self : {
pname = "haddock";
version = "2.0.0.0";
name = "${pname}-${version}";
src = fetchurl {
url = "http://hackage.haskell.org/packages/archive/${pname}/${version}/${name}.tar.gz";
sha256 = "a2ea5bdc127bc8b189a8d869f582ec774fea0933e7f5ca89549a6c142b9993df";
name = self.fname;
sha256 = "a2ea5bdc127bc8b189a8d869f582ec774fea0933e7f5ca89549a6c142b9993df";
meta = {
description = "a tool for automatically generating documentation from annotated Haskell source code";
};
buildInputs = [ghc];
configurePhase = ''
ghc --make Setup.lhs
./Setup configure -v --prefix="$out"
'';
buildPhase = ''
./Setup build
'';
installPhase = ''
./Setup install
'';
})

View File

@@ -1,28 +1,12 @@
{stdenv, fetchurl, perl, ghc}:
{cabal, perl}:
stdenv.mkDerivation (rec {
cabal.mkDerivation (self : {
# requires cabal-1.2 (and therefore, in Nix, currently ghc-6.8)
pname = "happy";
version = "1.17";
name = "${pname}-${version}";
src = fetchurl {
url = "http://www.haskell.org/happy/dist/${version}/${name}.tar.gz";
sha256 = "dca4e47d17e5d538335496236b3d2c3cbff644cf7380c987a4714e7784c70a2b";
};
buildInputs = [ghc perl];
configurePhase = "
ghc --make Setup.lhs
./Setup configure --prefix=\"\${out}\"
";
buildPhase = "
./Setup build
";
installPhase = "
./Setup install
";
name = self.fname;
sha256 = "dca4e47d17e5d538335496236b3d2c3cbff644cf7380c987a4714e7784c70a2b";
extraBuildInputs = [perl];
})