2009-04-19 21:06:34 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, gnome, cairo, ghc, mtl }:
|
|
|
|
|
2009-04-19 15:58:13 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2008-01-25 13:42:07 +01:00
|
|
|
pname = "gtk2hs";
|
2009-04-19 15:58:13 +02:00
|
|
|
version = "0.10.0";
|
2008-01-25 13:42:07 +01:00
|
|
|
fname = "${pname}-${version}";
|
2009-04-19 15:58:13 +02:00
|
|
|
name = "haskell-${pname}-ghc${ghc.ghc.version}-${version}";
|
|
|
|
|
2007-11-12 14:48:33 +01:00
|
|
|
src = fetchurl {
|
2009-04-19 21:06:34 +02:00
|
|
|
url = http://nixos.org/tarballs/gtk2hs-0.10.0-20090419.tar.gz;
|
|
|
|
sha256 = "18a7cfph83yvv91ks37nrgqrn21fvww8bhb8nd8xy1mgb8lnfds1";
|
2007-11-12 14:48:33 +01:00
|
|
|
};
|
2009-04-19 21:06:34 +02:00
|
|
|
|
2009-04-19 15:58:13 +02:00
|
|
|
propagatedBuildInputs = [mtl];
|
2007-11-12 14:48:33 +01:00
|
|
|
|
2009-04-19 15:58:13 +02:00
|
|
|
buildInputs = [
|
2009-04-19 21:06:34 +02:00
|
|
|
pkgconfig cairo ghc gnome.glib gnome.gtk gnome.libglade
|
2010-06-16 08:33:47 +02:00
|
|
|
gnome.GConf gnome.gtksourceview gnome.librsvg
|
2007-11-12 14:48:33 +01:00
|
|
|
];
|
|
|
|
|
2009-05-06 01:06:01 +02:00
|
|
|
preConfigure =
|
|
|
|
''
|
|
|
|
sed -i gio/gio.package.conf.in -e 's|@GIO_LIBDIR_CQ@|"${gnome.glib}/lib", "${gnome.glib}/lib64", @GIO_LIBDIR_CQ@|'
|
|
|
|
sed -i gtk/gtk.package.conf.in -e 's|@GTK_LIBDIR_CQ@|"${gnome.glib}/lib", "${gnome.glib}/lib64", @GTK_LIBDIR_CQ@|'
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = ["--without-pkgreg"];
|
|
|
|
|
2009-04-19 15:58:13 +02:00
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
local confDir=$out/lib/ghc-pkgs/ghc-${ghc.ghc.version}
|
2009-04-28 20:58:34 +02:00
|
|
|
local installedPkgConf=$confDir/${fname}.installedconf
|
2009-05-06 01:06:01 +02:00
|
|
|
ensureDir $out/bin # necessary to get it added to PATH
|
2009-04-19 15:58:13 +02:00
|
|
|
ensureDir $confDir
|
2009-04-28 20:58:34 +02:00
|
|
|
echo $installedPkgConf
|
|
|
|
echo '[]' > $installedPkgConf
|
|
|
|
for pkgConf in $out/lib/gtk2hs/*.conf; do
|
|
|
|
cp $pkgConf $confDir/
|
|
|
|
GHC_PACKAGE_PATH=$installedPkgConf ghc-pkg --global register $pkgConf --force
|
|
|
|
done
|
2009-04-19 15:58:13 +02:00
|
|
|
''; # */
|
2009-04-19 21:06:34 +02:00
|
|
|
|
2010-06-16 08:33:47 +02:00
|
|
|
passthru = { inherit (gnome) gtksourceview; };
|
2009-04-19 15:58:13 +02:00
|
|
|
}
|