summary refs log tree commit diff
path: root/pkgs/development/libraries/glib/default.nix
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2013-08-03 09:45:22 +0200
committerVladimír Čunát <vcunat@gmail.com>2013-08-03 09:45:22 +0200
commitd374527509657cfeb8499118b26e7605fab8f4d2 (patch)
treeabdaa960e67e2bfe58484da19bddbb107550593c /pkgs/development/libraries/glib/default.nix
parent661a1a68a601843ffe4e1321e496f7f23c31e6fc (diff)
downloadnixpkgs-d374527509657cfeb8499118b26e7605fab8f4d2.tar
nixpkgs-d374527509657cfeb8499118b26e7605fab8f4d2.tar.gz
nixpkgs-d374527509657cfeb8499118b26e7605fab8f4d2.tar.bz2
nixpkgs-d374527509657cfeb8499118b26e7605fab8f4d2.tar.lz
nixpkgs-d374527509657cfeb8499118b26e7605fab8f4d2.tar.xz
nixpkgs-d374527509657cfeb8499118b26e7605fab8f4d2.tar.zst
nixpkgs-d374527509657cfeb8499118b26e7605fab8f4d2.zip
GTK-related minor updates
Diffstat (limited to 'pkgs/development/libraries/glib/default.nix')
-rw-r--r--pkgs/development/libraries/glib/default.nix32
1 files changed, 21 insertions, 11 deletions
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix
index b5e2b1e43b2..6c53e573bf6 100644
--- a/pkgs/development/libraries/glib/default.nix
+++ b/pkgs/development/libraries/glib/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchurl, pkgconfig, gettext, perl, libiconvOrEmpty, zlib, libffi
-, python, pcre, libelf, libintlOrEmpty }:
+{ stdenv, fetchurl, pkgconfig, gettext, perl, python, autoconf, automake, libtool
+, libiconvOrEmpty, libintlOrEmpty, zlib, libffi, pcre, libelf, dbus }:
 
 # TODO:
 # * Add gio-module-fam
@@ -23,30 +23,41 @@ let
     ln -sr -t "$out/include/" $out/lib/*/include/* 2>/dev/null || true
   '';
 in
+with { inherit (stdenv.lib) optionalString; };
 
 stdenv.mkDerivation rec {
-  name = "glib-2.36.1";
+  name = "glib-2.36.3";
 
   src = fetchurl {
     url = "mirror://gnome/sources/glib/2.36/${name}.tar.xz";
-    sha256 = "090bw5par3dfy5m6dhq393pmy92zpw3d7rgbzqjc14jfg637bqvx";
+    sha256 = "07kn9j0gbh97mmmn72ird628klfdrswx1hqrcr1lqbp0djzk7i2y";
   };
 
-  # configure script looks for d-bus but it is only needed for tests
-  buildInputs = [ libelf ] ++ libintlOrEmpty;
+  # configure script looks for d-bus but it is (probably) only needed for tests
+  buildInputs = [ libelf ];
 
-  nativeBuildInputs = [ perl pkgconfig gettext python ];
+  # I don't know why the autotools are needed now, even without modifying configure scripts
+  nativeBuildInputs = [ pkgconfig gettext perl python ] ++ [ autoconf automake libtool ];
 
-  propagatedBuildInputs = [ pcre zlib libffi ] ++ libiconvOrEmpty;
+  propagatedBuildInputs = [ pcre zlib libffi ] ++ libiconvOrEmpty ++ libintlOrEmpty;
 
+  preConfigure = "autoreconf -fi";
   configureFlags = "--with-pcre=system --disable-fam";
 
-  postConfigure = "sed '/SANE_MALLOC_PROTOS/s,^,//,' -i config.h";
+  postConfigure =
+    optionalString stdenv.isDarwin (''
+      sed '24 i #include <Foundation/Foundation.h>'
+    '' + /* Disable the NeXTstep back-end because stdenv.gcc doesn't support Objective-C. */ ''
+      sed -i configure -e's/glib_have_cocoa=yes/glib_have_cocoa=no/g'
+    '');
 
-  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
+  NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-lintl";
 
   enableParallelBuilding = true;
 
+  doCheck = false; # ToDo: fix the remaining problems, so we have checked glib by default
+  LD_LIBRARY_PATH = optionalString doCheck "${stdenv.gcc.gcc}/lib";
+
   postInstall = ''rm -rvf $out/share/gtk-doc'';
 
   passthru = {
@@ -69,4 +80,3 @@ stdenv.mkDerivation rec {
     '';
   };
 }
-