diff options
Diffstat (limited to 'pkgs/development/libraries/glib/default.nix')
-rw-r--r-- | pkgs/development/libraries/glib/default.nix | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 1eb50fc4f100..37275489cc3d 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -1,7 +1,8 @@ -{ stdenv, fetchurl, gettext, meson, ninja, pkgconfig, perl, python3, glibcLocales +{ stdenv, fetchurl, fetchpatch, gettext, meson, ninja, pkgconfig, perl, python3, glibcLocales , libiconv, zlib, libffi, pcre, libelf, gnome3, libselinux, bash, gnum4, gtk-doc, docbook_xsl, docbook_xml_dtd_45 # use utillinuxMinimal to avoid circular dependency (utillinux, systemd, glib) , utillinuxMinimal ? null +, buildPackages # this is just for tests (not in the closure of any regular package) , doCheck ? stdenv.config.doCheckByDefault or false @@ -43,7 +44,7 @@ let ln -sr -t "''${!outputInclude}/include/" "''${!outputInclude}"/lib/*/include/* 2>/dev/null || true ''; - version = "2.58.1"; + version = "2.58.2"; in stdenv.mkDerivation rec { @@ -51,7 +52,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/glib/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz"; - sha256 = "1mnp4vankish8bqxymdl591p9v1ynk7pfc5dmpx3vamn4vcskmlp"; + sha256 = "0jrxfm4gn1qz3y1450z709v74ys2bkjr8yffkgy106kgagb4xcn7"; }; patches = optional stdenv.isDarwin ./darwin-compilation.patch @@ -63,6 +64,12 @@ stdenv.mkDerivation rec { ./schema-override-variable.patch # Require substituteInPlace in postPatch ./fix-gio-launch-desktop-path.patch + # https://gitlab.gnome.org/GNOME/glib/issues/1626 + # https://gitlab.gnome.org/GNOME/glib/merge_requests/557 + (fetchpatch { + url = https://gitlab.gnome.org/GNOME/glib/commit/85c4031696add9797e2334ced20678edcd96c869.patch; + sha256 = "1hmyvhx89wip2a26gk1rvd87k0pjfia51s0ysybjyzf5f1pzw877"; + }) ]; outputs = [ "bin" "out" "dev" "devdoc" ]; @@ -78,12 +85,16 @@ stdenv.mkDerivation rec { utillinuxMinimal # for libmount ]; - nativeBuildInputs = [ meson ninja pkgconfig perl python3 gettext gtk-doc docbook_xsl docbook_xml_dtd_45 glibcLocales ]; + nativeBuildInputs = [ + meson ninja pkgconfig perl python3 gettext gtk-doc docbook_xsl docbook_xml_dtd_45 glibcLocales + ]; propagatedBuildInputs = [ zlib libffi gettext libiconv ]; mesonFlags = [ - "-Dgtk_doc=true" + # Avoid the need for gobject introspection binaries in PATH in cross-compiling case. + # Instead we just copy them over from the native output. + "-Dgtk_doc=${if stdenv.hostPlatform == stdenv.buildPlatform then "true" else "false"}" ]; LC_ALL = "en_US.UTF-8"; @@ -126,6 +137,8 @@ stdenv.mkDerivation rec { # 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"' \ -i "$dev"/include/glib-2.0/gobject/gobjectnotifyqueue.c + '' + optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + cp -r ${buildPackages.glib.devdoc} $devdoc ''; checkInputs = [ tzdata libxml2 desktop-file-utils shared-mime-info ]; |