parent
96f07fa74e
commit
dcf6cbf5b3
@ -1,5 +1,9 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, gettext, perl, python, autoconf, automake, libtool
|
{ stdenv, fetchurl, pkgconfig, gettext, perl, python
|
||||||
, libiconvOrEmpty, libintlOrEmpty, zlib, libffi, pcre, libelf, dbus }:
|
, 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:
|
# TODO:
|
||||||
# * Add gio-module-fam
|
# * Add gio-module-fam
|
||||||
@ -17,7 +21,6 @@
|
|||||||
https://wiki.gnome.org/GnomeGoals/InstalledTests
|
https://wiki.gnome.org/GnomeGoals/InstalledTests
|
||||||
* Support org.freedesktop.Application, including D-Bus activation from desktop files
|
* Support org.freedesktop.Application, including D-Bus activation from desktop files
|
||||||
*/
|
*/
|
||||||
|
|
||||||
let
|
let
|
||||||
# Some packages don't get "Cflags" from pkgconfig correctly
|
# Some packages don't get "Cflags" from pkgconfig correctly
|
||||||
# and then fail to build when directly including like <glib/...>.
|
# and then fail to build when directly including like <glib/...>.
|
||||||
@ -35,7 +38,7 @@ let
|
|||||||
ver_maj = "2.38";
|
ver_maj = "2.38";
|
||||||
ver_min = "2";
|
ver_min = "2";
|
||||||
in
|
in
|
||||||
with { inherit (stdenv.lib) optional optionalString; };
|
with { inherit (stdenv.lib) optional optionals optionalString; };
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "glib-${ver_maj}.${ver_min}";
|
name = "glib-${ver_maj}.${ver_min}";
|
||||||
@ -45,28 +48,33 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0d2px8m77603s5pm3md4bcm5d0ksbcsb6ik1w52hjslnq1a9hsh5";
|
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 ];
|
||||||
nativeBuildInputs = [ pkgconfig gettext perl python ] ++ [ autoconf automake libtool ];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [ pcre zlib libffi ] ++ libiconvOrEmpty ++ libintlOrEmpty;
|
propagatedBuildInputs = [ pcre zlib libffi ] ++ libiconvOrEmpty ++ libintlOrEmpty;
|
||||||
|
|
||||||
preConfigure = "autoreconf -fi";
|
|
||||||
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
optional stdenv.isDarwin "--disable-compile-warnings"
|
optional stdenv.isDarwin "--disable-compile-warnings"
|
||||||
++ optional stdenv.isSunOS "--disable-modular-tests";
|
++ optional stdenv.isSunOS "--disable-modular-tests";
|
||||||
|
|
||||||
CPPFLAGS = optionalString stdenv.isSunOS "-DBSD_COMP";
|
NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin " -lintl"
|
||||||
|
+ optionalString stdenv.isSunOS " -DBSD_COMP";
|
||||||
NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-lintl";
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
doCheck = false; # ToDo: fix the remaining problems, so we have checked glib by default
|
inherit doCheck;
|
||||||
LD_LIBRARY_PATH = optionalString doCheck "${stdenv.gcc.gcc}/lib";
|
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'';
|
postInstall = ''rm -rvf $out/share/gtk-doc'';
|
||||||
|
|
||||||
|
@ -4388,8 +4388,8 @@ let
|
|||||||
stdenv = if stdenv.isDarwin
|
stdenv = if stdenv.isDarwin
|
||||||
then overrideGCC stdenv gccApple
|
then overrideGCC stdenv gccApple
|
||||||
else stdenv;
|
else stdenv;
|
||||||
automake = automake113x;
|
|
||||||
};
|
};
|
||||||
|
glib-tested = glib.override { doCheck = true; }; # checked version separate to break cycles
|
||||||
glibmm = callPackage ../development/libraries/glibmm { };
|
glibmm = callPackage ../development/libraries/glibmm { };
|
||||||
|
|
||||||
glib_networking = callPackage ../development/libraries/glib-networking {};
|
glib_networking = callPackage ../development/libraries/glib-networking {};
|
||||||
|
@ -35,6 +35,8 @@ let
|
|||||||
# Ensure that X11/GTK+ are in order.
|
# Ensure that X11/GTK+ are in order.
|
||||||
jobs.thunderbird.x86_64-linux
|
jobs.thunderbird.x86_64-linux
|
||||||
jobs.thunderbird.i686-linux
|
jobs.thunderbird.i686-linux
|
||||||
|
jobs.glib-tested.x86_64-linux # standard glib doesn't do checks
|
||||||
|
jobs.glib-tested.i686-linux
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user