mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
parent
96f07fa74e
commit
dcf6cbf5b3
3 changed files with 26 additions and 16 deletions
|
@ -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 <glib/...>.
|
||||
|
@ -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'';
|
||||
|
||||
|
|
|
@ -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 {};
|
||||
|
|
|
@ -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
|
||||
];
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue