glib: 2.52.3 -> 2.54.0
License was updated upstream. Also tidy the expression a bit, and unify the nix coding style.
This commit is contained in:
parent
b4be1cb8e0
commit
00b4e2646c
|
@ -42,8 +42,8 @@ let
|
||||||
ln -sr -t "''${!outputInclude}/include/" "''${!outputInclude}"/lib/*/include/* 2>/dev/null || true
|
ln -sr -t "''${!outputInclude}/include/" "''${!outputInclude}"/lib/*/include/* 2>/dev/null || true
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ver_maj = "2.52";
|
ver_maj = "2.54";
|
||||||
ver_min = "3";
|
ver_min = "0";
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -51,10 +51,11 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnome/sources/glib/${ver_maj}/${name}.tar.xz";
|
url = "mirror://gnome/sources/glib/${ver_maj}/${name}.tar.xz";
|
||||||
sha256 = "0a71wkkhkvad84gm30w13micxxgqqw3sxhybj7nd9z60lwspdvi5";
|
sha256 = "fe22998ff0394ec31e6e5511c379b74011bee61a4421bca7fcab223dfbe0fc6a";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = optional stdenv.isDarwin ./darwin-compilation.patch ++ optional doCheck ./skip-timer-test.patch;
|
patches = optional stdenv.isDarwin ./darwin-compilation.patch
|
||||||
|
++ optional doCheck ./skip-timer-test.patch;
|
||||||
|
|
||||||
outputs = [ "out" "dev" "devdoc" ];
|
outputs = [ "out" "dev" "devdoc" ];
|
||||||
outputBin = "dev";
|
outputBin = "dev";
|
||||||
|
@ -76,21 +77,23 @@ stdenv.mkDerivation rec {
|
||||||
++ optional (stdenv.isFreeBSD || stdenv.isSunOS) "--with-libiconv=gnu"
|
++ optional (stdenv.isFreeBSD || stdenv.isSunOS) "--with-libiconv=gnu"
|
||||||
++ optional stdenv.isSunOS "--disable-dtrace";
|
++ optional stdenv.isSunOS "--disable-dtrace";
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin " -lintl"
|
NIX_CFLAGS_COMPILE = optional stdenv.isDarwin "-lintl"
|
||||||
+ optionalString stdenv.isSunOS " -DBSD_COMP";
|
++ optional stdenv.isSunOS "-DBSD_COMP";
|
||||||
|
|
||||||
preConfigure = if !stdenv.isSunOS then null else
|
preConfigure = optionalString stdenv.isSunOS ''
|
||||||
''
|
sed -i -e 's|inotify.h|foobar-inotify.h|g' configure
|
||||||
sed -i -e 's|inotify.h|foobar-inotify.h|g' configure
|
'';
|
||||||
'';
|
|
||||||
|
postConfigure = ''
|
||||||
|
patchShebangs ./gobject/
|
||||||
|
'';
|
||||||
|
|
||||||
LIBELF_CFLAGS = optional stdenv.isFreeBSD "-I${libelf}";
|
LIBELF_CFLAGS = optional stdenv.isFreeBSD "-I${libelf}";
|
||||||
LIBELF_LIBS = optional stdenv.isFreeBSD "-L${libelf} -lelf";
|
LIBELF_LIBS = optional stdenv.isFreeBSD "-L${libelf} -lelf";
|
||||||
|
|
||||||
preBuild = optionalString stdenv.isDarwin
|
preBuild = optionalString stdenv.isDarwin ''
|
||||||
''
|
export MACOSX_DEPLOYMENT_TARGET=
|
||||||
export MACOSX_DEPLOYMENT_TARGET=
|
'';
|
||||||
'';
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
DETERMINISTIC_BUILD = 1;
|
DETERMINISTIC_BUILD = 1;
|
||||||
|
@ -100,33 +103,36 @@ stdenv.mkDerivation rec {
|
||||||
substituteInPlace "$dev/bin/gdbus-codegen" --replace "$out" "$dev"
|
substituteInPlace "$dev/bin/gdbus-codegen" --replace "$out" "$dev"
|
||||||
sed -i "$dev/bin/glib-gettextize" -e "s|^gettext_dir=.*|gettext_dir=$dev/share/glib-2.0/gettext|"
|
sed -i "$dev/bin/glib-gettextize" -e "s|^gettext_dir=.*|gettext_dir=$dev/share/glib-2.0/gettext|"
|
||||||
''
|
''
|
||||||
# This file is *included* in gtk3 and would introduce runtime reference via __FILE__.
|
# This file is *included* in gtk3 and would introduce runtime reference via __FILE__.
|
||||||
+ ''
|
+ ''
|
||||||
sed '1i#line 1 "${name}/include/glib-2.0/gobject/gobjectnotifyqueue.c"' \
|
sed '1i#line 1 "${name}/include/glib-2.0/gobject/gobjectnotifyqueue.c"' \
|
||||||
-i "$dev"/include/glib-2.0/gobject/gobjectnotifyqueue.c
|
-i "$dev"/include/glib-2.0/gobject/gobjectnotifyqueue.c
|
||||||
'';
|
'';
|
||||||
|
|
||||||
inherit doCheck;
|
inherit doCheck;
|
||||||
preCheck = optionalString doCheck
|
preCheck = optionalString doCheck ''
|
||||||
'' export LD_LIBRARY_PATH="$NIX_BUILD_TOP/${name}/glib/.libs:$LD_LIBRARY_PATH"
|
export LD_LIBRARY_PATH="$NIX_BUILD_TOP/${name}/glib/.libs:$LD_LIBRARY_PATH"
|
||||||
export TZDIR="${tzdata}/share/zoneinfo"
|
export TZDIR="${tzdata}/share/zoneinfo"
|
||||||
export XDG_CACHE_HOME="$TMP"
|
export XDG_CACHE_HOME="$TMP"
|
||||||
export XDG_RUNTIME_HOME="$TMP"
|
export XDG_RUNTIME_HOME="$TMP"
|
||||||
export HOME="$TMP"
|
export HOME="$TMP"
|
||||||
export XDG_DATA_DIRS="${desktop_file_utils}/share:${shared_mime_info}/share"
|
export XDG_DATA_DIRS="${desktop_file_utils}/share:${shared_mime_info}/share"
|
||||||
export G_TEST_DBUS_DAEMON="${dbus_daemon.out}/bin/dbus-daemon"
|
export G_TEST_DBUS_DAEMON="${dbus_daemon.out}/bin/dbus-daemon"
|
||||||
|
export PATH="$PATH:$(pwd)/gobject"
|
||||||
|
echo "PATH=$PATH"
|
||||||
|
|
||||||
substituteInPlace gio/tests/desktop-files/home/applications/epiphany-weather-for-toronto-island-9c6a4e022b17686306243dada811d550d25eb1fb.desktop --replace "Exec=/bin/true" "Exec=${coreutils}/bin/true"
|
substituteInPlace gio/tests/desktop-files/home/applications/epiphany-weather-for-toronto-island-9c6a4e022b17686306243dada811d550d25eb1fb.desktop \
|
||||||
# Needs machine-id, comment the test
|
--replace "Exec=/bin/true" "Exec=${coreutils}/bin/true"
|
||||||
sed -e '/\/gdbus\/codegen-peer-to-peer/ s/^\/*/\/\//' -i gio/tests/gdbus-peer.c
|
# Needs machine-id, comment the test
|
||||||
sed -e '/g_test_add_func/ s/^\/*/\/\//' -i gio/tests/gdbus-unix-addresses.c
|
sed -e '/\/gdbus\/codegen-peer-to-peer/ s/^\/*/\/\//' -i gio/tests/gdbus-peer.c
|
||||||
# All gschemas fail to pass the test, upstream bug?
|
sed -e '/g_test_add_func/ s/^\/*/\/\//' -i gio/tests/gdbus-unix-addresses.c
|
||||||
sed -e '/g_test_add_data_func/ s/^\/*/\/\//' -i gio/tests/gschema-compile.c
|
# All gschemas fail to pass the test, upstream bug?
|
||||||
# Cannot reproduce the failing test_associations on hydra
|
sed -e '/g_test_add_data_func/ s/^\/*/\/\//' -i gio/tests/gschema-compile.c
|
||||||
sed -e '/\/appinfo\/associations/d' -i gio/tests/appinfo.c
|
# Cannot reproduce the failing test_associations on hydra
|
||||||
# Needed because of libtool wrappers
|
sed -e '/\/appinfo\/associations/d' -i gio/tests/appinfo.c
|
||||||
sed -e '/g_subprocess_launcher_set_environ (launcher, envp);/a g_subprocess_launcher_setenv (launcher, "PATH", g_getenv("PATH"), TRUE);' -i gio/tests/gsubprocess.c
|
# Needed because of libtool wrappers
|
||||||
'';
|
sed -e '/g_subprocess_launcher_set_environ (launcher, envp);/a g_subprocess_launcher_setenv (launcher, "PATH", g_getenv("PATH"), TRUE);' -i gio/tests/gsubprocess.c
|
||||||
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
gioModuleDir = "lib/gio/modules";
|
gioModuleDir = "lib/gio/modules";
|
||||||
|
@ -136,7 +142,7 @@ stdenv.mkDerivation rec {
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "C library of programming buildings blocks";
|
description = "C library of programming buildings blocks";
|
||||||
homepage = https://www.gtk.org/;
|
homepage = https://www.gtk.org/;
|
||||||
license = licenses.lgpl2Plus;
|
license = licenses.lgpl21Plus;
|
||||||
maintainers = with maintainers; [ lovek323 raskin ];
|
maintainers = with maintainers; [ lovek323 raskin ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue