1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00
nixpkgs/pkgs/development/libraries/haskell/gtk2hs/default.nix
Andres Löh 33b76a9312 added json Haskell package; improved gtk2hs
svn path=/nixpkgs/trunk/; revision=15460
2009-05-05 23:06:01 +00:00

47 lines
1.4 KiB
Nix

{ stdenv, fetchurl, pkgconfig, gnome, cairo, ghc, mtl }:
let gtksourceview = gnome.gtksourceview_24; in
stdenv.mkDerivation rec {
pname = "gtk2hs";
version = "0.10.0";
fname = "${pname}-${version}";
name = "haskell-${pname}-ghc${ghc.ghc.version}-${version}";
src = fetchurl {
url = http://nixos.org/tarballs/gtk2hs-0.10.0-20090419.tar.gz;
sha256 = "18a7cfph83yvv91ks37nrgqrn21fvww8bhb8nd8xy1mgb8lnfds1";
};
propagatedBuildInputs = [mtl];
buildInputs = [
pkgconfig cairo ghc gnome.glib gnome.gtk gnome.libglade
gnome.GConf gtksourceview gnome.librsvg
];
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"];
postInstall =
''
local confDir=$out/lib/ghc-pkgs/ghc-${ghc.ghc.version}
local installedPkgConf=$confDir/${fname}.installedconf
ensureDir $out/bin # necessary to get it added to PATH
ensureDir $confDir
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
''; # */
passthru = { inherit gtksourceview; };
}