forked from mirrors/nixpkgs
updated ghc stuff (added WashNGo, readded support for using local package db)
svn path=/nixpkgs/trunk/; revision=11819
This commit is contained in:
parent
1f15a6abfd
commit
c59433ffda
|
@ -4,7 +4,7 @@ args.stdenv.mkDerivation {
|
|||
|
||||
src = args.fetchurl {
|
||||
url = http://mawercer.de/hasktags.hs;
|
||||
sha256 = "af43a7fb1280aeec06ad3cfe6a7a01cf69b96f6dcd736e228b7532b79e6e51c5";
|
||||
sha256 = "9694256922899221a547f0ece57b192ba86761b42acb208424a011d55c51b603";
|
||||
};
|
||||
|
||||
buildInputs =(with args; [ghc]);
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
args: with args;
|
||||
let inherit (bleedingEdgeRepos) sourceByName;
|
||||
in
|
||||
# map ghcCabalExecutableFun and add cabal dependency to all
|
||||
lib.mapAttrs ( name_dummy : a : ghcCabalExecutableFun (a // { libsFun = x : (a.libsFun x) ++ [x.cabal_darcs]; } ) )
|
||||
{
|
||||
executables = lib.mapAttrs ( name_dummy : a : ghcCabalExecutableFun (a // { libsFun = x : (a.libsFun x) ++ [x.cabal_darcs]; } ) )
|
||||
({
|
||||
happy = {
|
||||
name = "happy-1.17";
|
||||
libsFun = x : [x.base x.directory x.haskell98 x.mtl];
|
||||
|
@ -18,7 +17,7 @@ lib.mapAttrs ( name_dummy : a : ghcCabalExecutableFun (a // { libsFun = x : (a.l
|
|||
license = "BSD3";
|
||||
};
|
||||
pass = {
|
||||
patchPhase = '' sed -e "s/buildVerbose flags/fromFlag (buildVerbose flags)/g" -e "s/BuildFlags(..)/BuildFlags(..), fromFlag/g" -i Setup.lhs '';
|
||||
patchPhase = '' sed -e "s/buildVerbose flags/fromFlag (buildVerbosity flags)/g" -e "s/BuildFlags(..)/BuildFlags(..), fromFlag/g" -i Setup.lhs '';
|
||||
};
|
||||
};
|
||||
alex = {
|
||||
|
@ -35,7 +34,70 @@ lib.mapAttrs ( name_dummy : a : ghcCabalExecutableFun (a // { libsFun = x : (a.l
|
|||
license = "BSD3";
|
||||
};
|
||||
pass = {
|
||||
patchPhase = '' sed -e "s/buildVerbose flags/fromFlag (buildVerbose flags)/g" -e "s/BuildFlags(..)/BuildFlags(..), fromFlag/g" -i Setup.lhs '';
|
||||
patchPhase = '' sed -e "s/buildVerbose flags/fromFlag (buildVerbosity flags)/g" -e "s/BuildFlags(..)/BuildFlags(..), fromFlag/g" -i Setup.lhs '';
|
||||
};
|
||||
};
|
||||
drift = {
|
||||
name = "DrIFT-2.2.3";
|
||||
libsFun = x : [ x.base x.haskell98 ];
|
||||
src = fetchurl {
|
||||
url = http://hackage.haskell.org/packages/archive/DrIFT/2.2.3/DrIFT-2.2.3.tar.gz;
|
||||
sha256 = "1615ijdz1bcmgnz86yx54ap6r7q08flh309jfyc7xaxxq5cdib0k";
|
||||
};
|
||||
meta = {
|
||||
description = "DrIFT is a type sensitive preprocessor for Haskell";
|
||||
homepage = http://repetae.net/computer/haskell/DrIFT/;
|
||||
license = "BSD3";
|
||||
};
|
||||
};
|
||||
hxq = {
|
||||
name="hxq-0.7";
|
||||
libsFun = x: [ x.base x.haskell98 x.template_haskell ];
|
||||
src = fetchurl { url = http://hackage.haskell.org/packages/archive/HXQ/0.7/HXQ-0.7.tar.gz; sha256 = "0zwar8fykks1n86zm0alkdx4yg903hkdr66wffsji6fhhpkzcmrh";};
|
||||
};
|
||||
leksah = {
|
||||
name="leksah-darcs";
|
||||
libsFun = x: [ x.base x.filepath x.parsec x.mtl x.process x.old_time x.containers x.pretty x.directory x.gtk2hs x.binary x.bytestring ];
|
||||
src = sourceByName "leksah";
|
||||
};
|
||||
#hsffig =
|
||||
# let version = "0.1.2-08-29-2007"; in
|
||||
# rec {
|
||||
# name = "hsffig-${version}";
|
||||
# src = fetchurl {
|
||||
# url = "http://www.golubovsky.org/software/hsffig/nightly/hsffig.${version}.tar.gz";
|
||||
# sha256 = "0pp27dchp5jshsacc1n15jvabsvc60l6phyfw0x9y6cmcwq72blg";
|
||||
# };
|
||||
# pass = { patchPhase = ''
|
||||
# sed -e "s/ALEX =.*/ALEX=alex/" -e "s/-package text//" -i Makefile
|
||||
# '';
|
||||
# buildPhase = "unset buildPhase; buildPhase"; [> force using default buildPhase
|
||||
# };
|
||||
# libsFun = x : [ x.base x.directory x.process x.cabal_darcs x.finitemap executables.alex executables.happy ];
|
||||
# meta = {
|
||||
# description = "automatically generates C bindings for haskell (needs hsc2hs)";
|
||||
# homepage = "now sourceforge";
|
||||
# license = "BSD";
|
||||
# executables = ["hsffig"];
|
||||
# };
|
||||
#};
|
||||
flapjax = {
|
||||
name = "flapjax-source-20070514";
|
||||
src = args.fetchurl {
|
||||
url = http://www.flapjax-lang.org/download/20070514/flapjax-source.tar.gz;
|
||||
sha256 = "188dafpggbfdyciqhrjaq12q0q01z1rp3mpm2iixb0mvrci14flc";
|
||||
};
|
||||
pass = { buildPhase = "
|
||||
ensureDir \$out/bin
|
||||
cd compiler;
|
||||
ghc --make Fjc.hs -o \$out/bin/fjc
|
||||
"; };
|
||||
libsFun = x : [x.mtl x.parsec x.random];
|
||||
meta = {
|
||||
description = "programming language designed around the demands of modern, client-based Web applications";
|
||||
homepage = http://www.flapjax-lang.org/;
|
||||
license = "BSD";
|
||||
executables = ["fjc"];
|
||||
};
|
||||
};
|
||||
/*
|
||||
|
@ -54,5 +116,22 @@ lib.mapAttrs ( name_dummy : a : ghcCabalExecutableFun (a // { libsFun = x : (a.l
|
|||
NIX_LDFLAGS = "-lz";
|
||||
};
|
||||
};
|
||||
|
||||
*/
|
||||
}
|
||||
mkcabal = {
|
||||
name = "mkcabal-0.4.1";
|
||||
libsFun = x : [x.base x.readline x.pcreLight x.mtl];
|
||||
src = sourceByName "mkcabal";
|
||||
meta = {
|
||||
executables = ["mkcabal"];
|
||||
description = "mkcabal";
|
||||
homepage = "hackage";
|
||||
license = "BSD3";
|
||||
};
|
||||
pass = {
|
||||
patchPhase = "sed -i s/0.3/0.3.1/g -i mkcabal.cabal";
|
||||
buildInputs = pkgs.readline; # hack - this shouldn't be needed!
|
||||
};
|
||||
};
|
||||
} // getConfig ["ghc68CustomExecutables"] (x : {} ) pkgs ); in executables
|
||||
|
||||
|
|
56
pkgs/misc/ghc68extraLibs/WASHNGo_Patch_ghc682
Normal file
56
pkgs/misc/ghc68extraLibs/WASHNGo_Patch_ghc682
Normal file
|
@ -0,0 +1,56 @@
|
|||
--- b/Setup.lhs 2007-07-13 16:06:51.000000000 +0000
|
||||
+++ a/Setup.lhs 2008-05-07 19:20:08.000000000 +0000
|
||||
@@ -4,7 +4,10 @@
|
||||
> import Distribution.Simple
|
||||
> import Distribution.Simple.Configure
|
||||
> import Distribution.Simple.LocalBuildInfo
|
||||
+> import Distribution.Simple.Program
|
||||
> import Distribution.Setup
|
||||
+> import Distribution.Text
|
||||
+> import Distribution.Verbosity
|
||||
> import Distribution.PackageDescription
|
||||
> import IO
|
||||
> import System
|
||||
@@ -17,23 +20,23 @@
|
||||
> { instHook = myInstaller
|
||||
> }
|
||||
>
|
||||
-> myInstaller :: PackageDescription -> LocalBuildInfo -> Maybe UserHooks -> InstallFlags -> IO ()
|
||||
-> myInstaller pdesc lbi mhook userFlags =
|
||||
-> do instHook defaultUserHooks pdesc lbi mhook userFlags
|
||||
+> myInstaller :: PackageDescription -> LocalBuildInfo -> UserHooks -> InstallFlags -> IO ()
|
||||
+> myInstaller pdesc lbi hook userFlags =
|
||||
+> do instHook defaultUserHooks pdesc lbi hook userFlags
|
||||
> myPostInstaller pdesc userFlags lbi
|
||||
>
|
||||
> -- | Build and install the shell script to invoke the Haskell compiler with
|
||||
> -- the correct flags
|
||||
> myPostInstaller :: PackageDescription -> InstallFlags -> LocalBuildInfo -> IO ()
|
||||
> myPostInstaller pdesc instFlags localBuildInfo =
|
||||
-> let hc = compiler localBuildInfo
|
||||
-> bindir = prefix localBuildInfo ++ "/bin"
|
||||
+> let bindir = ((fromPathTemplate . prefix . installDirTemplates) localBuildInfo) ++ "/bin"
|
||||
> generated = bindir ++ "/washc"
|
||||
-> pid = showPackageId (package pdesc)
|
||||
+> pid = display (package pdesc)
|
||||
> in
|
||||
> do h <- openFile generated WriteMode
|
||||
+> compilerPath <- fmap ( programPath . fst) $ requireProgram normal ghcProgram AnyVersion (withPrograms localBuildInfo)
|
||||
> hPutStrLn h "#!/bin/sh"
|
||||
-> hPutStr h (compilerPath hc)
|
||||
+> hPutStr h compilerPath
|
||||
> hPutStr h " -pgmF "
|
||||
> hPutStr h bindir
|
||||
> hPutStr h "/wash2hs"
|
||||
--- a/WASH.cabal 2008-05-11 22:35:37.000000000 +0200
|
||||
+++ b/WASH.cabal 2008-05-11 22:35:51.000000000 +0200
|
||||
@@ -8,7 +8,7 @@
|
||||
Category: Web
|
||||
Stability: Beta
|
||||
Synopsis: WASH is a family of embedded domain specific languages (EDSL) for programming Web applications in Haskell.
|
||||
-Build-Depends: base, regex-compat, haskell98, parsec
|
||||
+Build-Depends: base, regex-compat, haskell98, parsec, containers
|
||||
Extensions: ForeignFunctionInterface
|
||||
Exposed-Modules:
|
||||
WASH.CGI.AbstractSelector
|
||||
|
|
@ -41,6 +41,24 @@ rec {
|
|||
dataenc = { name = "dataenc-0.10.2"; src = fetchurl { url = http://hackage.haskell.org/packages/archive/dataenc/0.10.2/dataenc-0.10.2.tar.gz; sha256="1kl087994ajbwy65f24qjnz6wchlhmk5vkdw1506zzfbi5fr6x7r"; }; p_deps = [ x.base ]; };
|
||||
# other pacakges (hackage etc)
|
||||
polyparse = { name = "polyparse-2.3"; src = fetchurl { url = http://hackage.haskell.org/packages/archive/polyparse/1.1/polyparse-1.1.tar.gz; sha256 = "0mrrk3hhfrn68xn5y4jfg4ba0pa08bj05l007862vrxyyb4bksl7"; }; p_deps = [ x.base x.haskell98 ]; };
|
||||
/*
|
||||
bash: HaXml: command not found
|
||||
marc@nixos: ~ ]$ nix-prefetch-url http://hackage.haskell.org/packages/archive/hexpat/0.2/hexpat-0.2.tar.gz
|
||||
######################################################################## 100.0%
|
||||
hash is 05pcrh1czs6s3d7wv3ygiwf40ilmkiiygb86m1as2w2vwk9mqm6q
|
||||
path is /nix/store/ikrbg8w0xxnbnggbvld5af2ib1bdpcfn-hexpat-0.2.tar.gz
|
||||
05pcrh1czs6s3d7wv3ygiwf40ilmkiiygb86m1as2w2vwk9mqm6q
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
# hint = { name="hint-0.1"; src = fetchurl { url = "http://hackage.haskell.org/packages/archive/hint/0.1/hint-0.1.tar.gz"; sha256 = "1adydl2la4lxxl6zz24lm4vbdrsi4bkpppzxhpkkmzsjhhkpf2f9"; }; p_deps = [ x.base x.ghc x.haskellSrc x.mtl ]; };
|
||||
pcreLight = { name="pcre-light-0.3.1"; src= fetchurl { url = http://hackage.haskell.org/packages/archive/pcre-light/0.3.1/pcre-light-0.3.1.tar.gz; sha256 = "1h0qhfvqjcx59zkqhvsy7vw23l4444czg2z7b2lndy6cmkqc719m"; }; p_deps = [x.base x.bytestring pcre x.haskell98 ];
|
||||
pass = { patchPhase = "
|
||||
echo \" extra-lib-dirs: ${pcre}/lib\" >> pcre-light.cabal
|
||||
";
|
||||
}; };
|
||||
hsHaruPDF = { name = "HsHaruPDF-0.0.0"; src = fetchurl{url= "http://hackage.haskell.org/packages/archive/HsHaruPDF/0.0.0/HsHaruPDF-0.0.0.tar.gz"; sha256="1yifhxk1m3z2i7gaxgwlmk6cv2spbpx8fny4sn59ybca8wd9z7ps";}; p_deps = [ x.base x.haskell98 ];
|
||||
pass = { buildInputs = [ mysql zlib libpng ];
|
||||
patchPhase = "
|
||||
|
@ -57,6 +75,7 @@ rec {
|
|||
src = fetchurl { url = "http://hackage.haskell.org/packages/archive/binary/0.4.1/binary-0.4.1.tar.gz";
|
||||
sha256 = "0jg5i1k5fz0xp1piaaf5bzhagqvfl3i73hlpdmgs4gc40r1q4x5v"; };
|
||||
};
|
||||
hlist = { name="HList-0.1"; src = fetchurl { url="http://hackage.haskell.org/packages/archive/HList/0.1/HList-0.1.tar.gz"; sha256 = "1gv80qrnf71fzgb2ywaybkfvida0pwkd4a53vhmc0yg214yin4kh"; }; p_deps = [ ]; };
|
||||
# using different name to not clash with postgresql
|
||||
postgresql_bindings = rec { name = "PostgreSQL-0.2"; p_deps = [x.base x.mtl postgresql x.haskell98];
|
||||
src = fetchurl { url = "http://hackage.haskell.org/packages/archive/PostgreSQL/0.2/PostgreSQL-0.2.tar.gz";
|
||||
|
@ -70,19 +89,50 @@ rec {
|
|||
|
||||
};
|
||||
};
|
||||
#wash = rec { name = "WashNGo-2.12"; p_deps = [x.base x.mtl x.haskell98 ];
|
||||
# src = fetchurl { url = "http://www.informatik.uni-freiburg.de/~thiemann/WASH/WashNGo-2.12.tgz";
|
||||
# sha256 = "1dyc2062jpl3xdlm0n7xkz620h060g2i5ghnb32cn95brcj9fgrz"; };
|
||||
# patches = ../misc/WASHNGo_Patch_ghc682;
|
||||
# };
|
||||
zlib = rec { name = "zlib-0.4.0.4"; p_deps = [ x.base x.bytestring x.haskell98 ];
|
||||
src = fetchurl { url = "http://hackage.haskell.org/packages/archive/zlib/0.4.0.4/zlib-0.4.0.4.tar.gz";
|
||||
sha256 = "14hzqpzqs3rcwx6qpgybrcz33yrzb5y4p0bdsilhdgl15594ibad"; };
|
||||
pass = {
|
||||
patchPhase = ''
|
||||
echo " extra-lib-dirs: ${zlib}/lib" >> zlib.cabal
|
||||
echo " include-dirs: ${zlib}/include" >> zlib.cabal'';
|
||||
}; };
|
||||
bzlib = rec { name = "bzlib-0.4.0.3"; p_deps = [ x.base x.bytestring x.haskell98 ];
|
||||
src = fetchurl { url = "http://hackage.haskell.org/packages/archive/bzlib/0.4.0.3/bzlib-0.4.0.3.tar.gz";
|
||||
sha256 = "0mdhqds2d4lx75yy39bvbvmvkb81xl1mhgbjwi4299j7isrrgmb4"; };
|
||||
pass = {
|
||||
patchPhase = ''
|
||||
echo " extra-lib-dirs: ${bzip2}/lib
|
||||
include-dirs: ${bzip2}/include" >> bzlib.cabal '';
|
||||
}; };
|
||||
wash = rec { name = "WashNGo-2.12"; p_deps = [x.base x.mtl x.haskell98 x.regex_compat x.parsec x.containers ];
|
||||
src = fetchurl { url = "http://www.informatik.uni-freiburg.de/~thiemann/WASH/WashNGo-2.12.tgz";
|
||||
sha256 = "1dyc2062jpl3xdlm0n7xkz620h060g2i5ghnb32cn95brcj9fgrz"; };
|
||||
useLocalPkgDB = true;
|
||||
pass = {
|
||||
patches = ./WASHNGo_Patch_ghc682;
|
||||
};
|
||||
};
|
||||
|
||||
#hsql = rec { name = "hsql-1.7"; p_deps = [x.base x.mtl x.haskell98 x.old_time ];
|
||||
#src = fetchurl { url = "http://hackage.haskell.org/packages/archive/hsql/1.7/hsql-1.7.tar.gz";
|
||||
#sha256 = "0j2lkvg5c0x5gf2sy7zmmgrda0c3l73i9d6hyka2f15d5n1rfjc9"; };
|
||||
#pass = { patchPhase = "
|
||||
#sed -e 's=build-depends:.*=build-depends: base, old-locale, old-time=' -i hsql.cabal
|
||||
#echo \"extensions:
|
||||
#ForeignFunctionInterface, TypeSynonymInstances, CPP, ExistentialQuantification, GeneralizedNewtypeDeriving, PatternSignatures, ScopedTypeVariables, Rank2Types, DeriveDataTypeable \" >> hsql.cabal
|
||||
#"; };
|
||||
#};
|
||||
# supports new time library
|
||||
hsqlDarcs = rec { name = "hsql-darcs"; p_deps = [x.base x.mtl x.haskell98 x.old_time x.old_locale x.time ];
|
||||
src = sourceByName "hsql";
|
||||
pass = { srcDir = "HSQL"; };
|
||||
};
|
||||
hsqlMysqlDarcs = { name = "hsql-mysql-darcs"; srcDir = "MySQL"; src = sourceByName "hsql"; p_deps = [ x.base x.hsqlDarcs x.old_time ];
|
||||
pass = { buildInputs = [ mysql zlib ];
|
||||
patchPhase = "echo \" extra-lib-dirs: ${zlib}/lib\" >> MySQL/hsql-mysql.cabal";
|
||||
patchPhase = "echo \" extra-lib-dirs: ${zlib}/lib\" >> MySQL/hsql-mysql.cabal
|
||||
sed -e \"s=configVerbose=configVerbosity=\" -e \"s=sqlite_path=\$sqlite=\" -i MySQL/Setup.lhs
|
||||
";
|
||||
};
|
||||
};
|
||||
#hsql_postgresql = rec { name = "hsql-postgresql-1.7"; p_deps = [ x.base x.mtl x.haskell98 x.old_time x.hsql postgresql ];
|
||||
|
@ -105,6 +155,8 @@ rec {
|
|||
sed -e '/ODBC/d' -i Takusen.cabal
|
||||
sed -e '/Oracle/d' -i Takusen.cabal
|
||||
sed -e \"s=pg_path=\$postgresql=\" -e \"s=sqlite_path=\$sqlite=\" -i Setup.hs
|
||||
sed -e \"s=configVerbose=configVerbosity=\" -e \"s=sqlite_path=\$sqlite=\" -i Setup.hs
|
||||
sed -e \"s=regVerbose=regVerbosity=\" -e \"s=sqlite_path=\$sqlite=\" -i Setup.hs
|
||||
";
|
||||
};
|
||||
};
|
||||
|
@ -136,7 +188,7 @@ rec {
|
|||
};
|
||||
};
|
||||
|
||||
gtk2hs = rec { name = "gtk2hs-0.9.12.1"; p_deps = [ x.haskell98 x.mtl x.bytestring pkgconfig ] ++ (with gtkLibs; [ glib pango gtk gnome.glib]);
|
||||
gtk2hs = rec { name = "gtk2hs-0.9.12.1"; p_deps = [ x.haskell98 x.mtl x.bytestring pkgconfig ] ++ (with gtkLibs; [ glib pango gtk gnome.glib gnome.gtksourceview]);
|
||||
src = fetchurl {
|
||||
url = "http://downloads.sourceforge.net/gtk2hs/${name}.tar.gz";
|
||||
sha256 = "110z6v9gzhg6nzlz5gs8aafmipbva6rc50b8z1jgq0k2g25hfy22"; };
|
||||
|
@ -221,6 +273,7 @@ rec {
|
|||
|
||||
|
||||
/*
|
||||
|
||||
haskelldb-hsql-postgresql-0.10.tar.gz
|
||||
######################################################################## 100.0%
|
||||
hash is 00nva5hhaknm5via4c1p2wj7ibyn6q874f0c3izjb9dk7rivfvgv
|
||||
|
@ -349,14 +402,16 @@ rec {
|
|||
cabal_darcs =
|
||||
{ name=cabal_darcs_name; p_deps = with ghc.core_libs; [base rts directory process pretty containers filepath];
|
||||
src = sourceByName "cabal";
|
||||
pass = { dummy = 1; };
|
||||
};
|
||||
};
|
||||
} // (getConfig [ "ghc68CustomLibs" ] ( args: x : {} ) ) args x;
|
||||
#srcs_only = let x = pkgs; in map (y : y.src ) [ x.happs_util_darcs x.happs_data_darcs x.syb_with_class_darcs x.http_darcs
|
||||
# x.happs_server_darcs x.happs_ixset_darcs x.happs_plugins_darcs x.happs_server_darcs ];
|
||||
toDerivation = attrs : with attrs;
|
||||
# result is { mtl = <deriv>;
|
||||
addHasktagsTaggingInfo (ghcCabalDerivation {
|
||||
inherit (attrs) name src;
|
||||
useLocalPkgDB = attrs ? useLocalPkgDB;
|
||||
propagatedBuildInputs = p_deps ++ (lib.optional (attrs.name != cabal_darcs_name) derivations.cabal_darcs );
|
||||
srcDir = if attrs ? srcDir then attrs.srcDir else ".";
|
||||
# add cabal, take deps either from this list or from ghc.core_libs
|
||||
|
|
Loading…
Reference in a new issue