diff --git a/pkgs/development/libraries/haskell/HDBC/HDBC-1.1.4.nix b/pkgs/development/libraries/haskell/HDBC/HDBC-1.1.4.nix new file mode 100644 index 000000000000..429407d25d2a --- /dev/null +++ b/pkgs/development/libraries/haskell/HDBC/HDBC-1.1.4.nix @@ -0,0 +1,10 @@ +{cabal}: + +cabal.mkDerivation (self : { + pname = "HDBC"; + version = "1.1.4"; + sha256 = "de03020874b532f7aa734f093caf0709e7d33d0d64c59ce0a003b2269fc85597"; + meta = { + description = "HDBC provides an abstraction layer between Haskell programs and SQL relational databases"; + }; +}) diff --git a/pkgs/development/libraries/haskell/HDBC/HDBC-postgresql-1.1.4.0.nix b/pkgs/development/libraries/haskell/HDBC/HDBC-postgresql-1.1.4.0.nix new file mode 100644 index 000000000000..d9a1985839c5 --- /dev/null +++ b/pkgs/development/libraries/haskell/HDBC/HDBC-postgresql-1.1.4.0.nix @@ -0,0 +1,12 @@ +{cabal, HDBC, postgresql}: + +cabal.mkDerivation (self : { + pname = "HDBC-postgresql"; + version = "1.1.4.0"; + sha256 = "039eae03693330fee0e4083e22d502f94865969b243744a939786f598aec34ad"; + meta = { + description = "This package provides a PostgreSQL driver for HDBC"; + }; + propagatedBuildInputs = [HDBC postgresql]; +}) + diff --git a/pkgs/development/libraries/haskell/HDBC/HDBC-sqlite3-1.1.4.0.nix b/pkgs/development/libraries/haskell/HDBC/HDBC-sqlite3-1.1.4.0.nix new file mode 100644 index 000000000000..b0c7eb27e6a3 --- /dev/null +++ b/pkgs/development/libraries/haskell/HDBC/HDBC-sqlite3-1.1.4.0.nix @@ -0,0 +1,12 @@ +{cabal, HDBC, sqlite}: + +cabal.mkDerivation (self : { + pname = "HDBC-sqlite3"; + version = "1.1.4.0"; + sha256 = "328fed8d4cdba4311efd50d9d60591a81481317ddba10c58fbaa2ec7f418f788"; + meta = { + description = "This is the Sqlite v3 driver for HDBC, the generic database access system for Haskell"; + }; + propagatedBuildInputs = [HDBC sqlite]; +}) + diff --git a/pkgs/development/libraries/haskell/cabal/cabal.nix b/pkgs/development/libraries/haskell/cabal/cabal.nix index 1e08a819c0ec..bafcedced635 100644 --- a/pkgs/development/libraries/haskell/cabal/cabal.nix +++ b/pkgs/development/libraries/haskell/cabal/cabal.nix @@ -49,7 +49,7 @@ attrs : for i in ${toString self.patchLibFiles}; do echo "patching $i" - test -f $i && sed -i '/extra-libraries/ { s|\( *\)extra-libraries.*|&\n\1extra-lib-dirs: ${toString self.extraLibDirs}| }' $i + test -f $i && sed -i '/[eE]xtra-[lL]ibraries/ { s|\( *\)[eE]xtra-[lL]ibraries.*|&\n\1extra-lib-dirs: ${toString self.extraLibDirs}| }' $i done for i in Setup.hs Setup.lhs; do test -f $i && ghc --make $i diff --git a/pkgs/development/libraries/haskell/gtk2hs/default.nix b/pkgs/development/libraries/haskell/gtk2hs/default.nix index f4e3a02c73f8..e49f4d7113ec 100644 --- a/pkgs/development/libraries/haskell/gtk2hs/default.nix +++ b/pkgs/development/libraries/haskell/gtk2hs/default.nix @@ -1,18 +1,20 @@ {stdenv, fetchurl, pkgconfig, ghc, gtk, cairo, GConf, libglade , glib, libgtkhtml, gtkhtml}: -stdenv.mkDerivation { - name = "gtk2hs-0.9.12.1"; +stdenv.mkDerivation (rec { + pname = "gtk2hs"; + version = "0.9.12.1"; + fname = "${pname}-${version}"; + name = "haskell-${fname}"; src = fetchurl { - url = mirror://sourceforge/gtk2hs/gtk2hs-0.9.12.1.tar.gz; + url = "mirror://sourceforge/${pname}/${fname}.tar.gz"; sha256 = "110z6v9gzhg6nzlz5gs8aafmipbva6rc50b8z1jgq0k2g25hfy22"; }; buildInputs = [pkgconfig ghc gtk glib cairo GConf libglade libgtkhtml gtkhtml]; - configureFlags = [ + configureFlags = [ "--enable-cairo" ]; - -} +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5daef3ab07c9..a368bf1114d2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2690,9 +2690,20 @@ rec { }; gtk2hs = import ../development/libraries/haskell/gtk2hs { - inherit pkgconfig stdenv fetchurl cairo; + inherit pkgconfig stdenv fetchurl cairo ghc; inherit (gnome) gtk glib GConf libglade libgtkhtml gtkhtml; - ghc = ghc661; + }; + + HDBC = import ../development/libraries/haskell/HDBC/HDBC-1.1.4.nix { + inherit cabal; + }; + + HDBCPostgresql = import ../development/libraries/haskell/HDBC/HDBC-postgresql-1.1.4.0.nix { + inherit cabal HDBC postgresql; + }; + + HDBCSqlite = import ../development/libraries/haskell/HDBC/HDBC-sqlite3-1.1.4.0.nix { + inherit cabal HDBC sqlite; }; pcreLight = import ../development/libraries/haskell/pcre-light {