From dcf6cbf5b383eb66bafbdbaaf972eb1c7264c35c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 18 Feb 2014 20:03:03 +0100 Subject: [PATCH] glib: add -tested variant, also to the unstable job Replaces #1753. --- pkgs/development/libraries/glib/default.nix | 38 +++++++++++++-------- pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/release.nix | 2 ++ 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index de0a02c56e25..6fa77b233c67 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -1,5 +1,9 @@ -{ stdenv, fetchurl, pkgconfig, gettext, perl, python, autoconf, automake, libtool -, libiconvOrEmpty, libintlOrEmpty, zlib, libffi, pcre, libelf, dbus }: +{ stdenv, fetchurl, pkgconfig, gettext, perl, python +, libiconvOrEmpty, libintlOrEmpty, zlib, libffi, pcre, libelf + +# this is just for tests (not in closure of any regular package) +, libxml2, tzdata, desktop_file_utils, shared_mime_info, doCheck ? false +}: # TODO: # * Add gio-module-fam @@ -17,7 +21,6 @@ https://wiki.gnome.org/GnomeGoals/InstalledTests * Support org.freedesktop.Application, including D-Bus activation from desktop files */ - let # Some packages don't get "Cflags" from pkgconfig correctly # and then fail to build when directly including like . @@ -35,7 +38,7 @@ let ver_maj = "2.38"; ver_min = "2"; in -with { inherit (stdenv.lib) optional optionalString; }; +with { inherit (stdenv.lib) optional optionals optionalString; }; stdenv.mkDerivation rec { name = "glib-${ver_maj}.${ver_min}"; @@ -45,28 +48,33 @@ stdenv.mkDerivation rec { sha256 = "0d2px8m77603s5pm3md4bcm5d0ksbcsb6ik1w52hjslnq1a9hsh5"; }; - # configure script looks for d-bus but it is (probably) only needed for tests - buildInputs = [ libelf ]; + buildInputs = [ libelf ] + ++ optionals doCheck [ tzdata libxml2 desktop_file_utils shared_mime_info ]; - # I don't know why the autotools are needed now, even without modifying configure scripts - nativeBuildInputs = [ pkgconfig gettext perl python ] ++ [ autoconf automake libtool ]; + nativeBuildInputs = [ pkgconfig gettext perl python ]; propagatedBuildInputs = [ pcre zlib libffi ] ++ libiconvOrEmpty ++ libintlOrEmpty; - preConfigure = "autoreconf -fi"; - configureFlags = optional stdenv.isDarwin "--disable-compile-warnings" ++ optional stdenv.isSunOS "--disable-modular-tests"; - CPPFLAGS = optionalString stdenv.isSunOS "-DBSD_COMP"; - - NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-lintl"; + NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin " -lintl" + + optionalString stdenv.isSunOS " -DBSD_COMP"; 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"; + inherit doCheck; + preCheck = optionalString doCheck + # libgcc_s.so.1 must be installed for pthread_cancel to work + # also point to the glib/.libs path + '' export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.gcc.gcc}/lib*/libgcc_s.so)):$NIX_BUILD_TOP/${name}/glib/.libs:$LD_LIBRARY_PATH" + export TZDIR="${tzdata}/share/zoneinfo" + export XDG_CACHE_HOME="$TMP" + export XDG_RUNTIME_HOME="$TMP" + export HOME="$TMP" + export XDG_DATA_DIRS="${desktop_file_utils}/share:${shared_mime_info}/share" + ''; postInstall = ''rm -rvf $out/share/gtk-doc''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 62fcfaca5f42..a87a68ae3663 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4388,8 +4388,8 @@ let stdenv = if stdenv.isDarwin then overrideGCC stdenv gccApple else stdenv; - automake = automake113x; }; + glib-tested = glib.override { doCheck = true; }; # checked version separate to break cycles glibmm = callPackage ../development/libraries/glibmm { }; glib_networking = callPackage ../development/libraries/glib-networking {}; diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 33ecef8b3a21..84ae44ec449c 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -35,6 +35,8 @@ let # Ensure that X11/GTK+ are in order. jobs.thunderbird.x86_64-linux jobs.thunderbird.i686-linux + jobs.glib-tested.x86_64-linux # standard glib doesn't do checks + jobs.glib-tested.i686-linux ]; };