diff options
Diffstat (limited to 'pkgs/development/libraries/gdk-pixbuf')
-rw-r--r-- | pkgs/development/libraries/gdk-pixbuf/default.nix | 88 | ||||
-rw-r--r-- | pkgs/development/libraries/gdk-pixbuf/xlib.nix | 4 |
2 files changed, 47 insertions, 45 deletions
diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index 08b8f70b2d9..7f63d5f67e7 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -7,43 +7,40 @@ , pkg-config , gettext , python3 -, libxml2 , libxslt , docbook-xsl-nons , docbook_xml_dtd_43 -, gtk-doc +, gi-docgen , glib , libtiff , libjpeg , libpng -, gnome3 +, gnome , gobject-introspection , doCheck ? false , makeWrapper -, fetchpatch +, lib }: +let + withGtkDoc = stdenv.buildPlatform == stdenv.hostPlatform; +in stdenv.mkDerivation rec { pname = "gdk-pixbuf"; - version = "2.40.0"; + version = "2.42.6"; - outputs = [ "out" "dev" "man" "devdoc" "installedTests" ]; + outputs = [ "out" "dev" "man" ] + ++ lib.optional withGtkDoc "devdoc" + ++ lib.optional (stdenv.buildPlatform == stdenv.hostPlatform) "installedTests"; src = fetchurl { - url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"; + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "0zz7pmw2z46g7mr1yjxbsdldd5pd03xbjc58inj8rxfqgrdvg9n4"; }; patches = [ # Move installed tests to a separate output ./installed-tests-path.patch - - # Temporary until the fix is released. - (fetchpatch { - name = "tests-circular-table.patch"; - url = "https://gitlab.gnome.org/GNOME/gdk-pixbuf/merge_requests/59.diff"; - sha256 = "0kaflac3mrh6031hwxk7j9fhli775hc503818h8zfl6b28zyn93f"; - }) ]; nativeBuildInputs = [ @@ -52,17 +49,16 @@ stdenv.mkDerivation rec { pkg-config gettext python3 - libxml2 - libxslt - docbook-xsl-nons - docbook_xml_dtd_43 - gtk-doc gobject-introspection makeWrapper glib - ] ++ stdenv.lib.optional stdenv.isDarwin [ - fixDarwinDylibNames - ]; + gi-docgen + + # for man pages + libxslt + docbook-xsl-nons + docbook_xml_dtd_43 + ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; propagatedBuildInputs = [ glib @@ -72,9 +68,8 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Ddocs=true" - "-Dx11=false" # use gdk-pixbuf-xlib - "-Dgir=${if gobject-introspection != null then "true" else "false"}" + "-Dgtk_doc=${lib.boolToString withGtkDoc}" + "-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}" "-Dgio_sniffing=false" ]; @@ -85,43 +80,50 @@ stdenv.mkDerivation rec { substituteInPlace tests/meson.build --subst-var-by installedtestsprefix "$installedTests" ''; + preInstall = '' + PATH=$PATH:$out/bin # for install script + ''; + postInstall = - # meson erroneously installs loaders with .dylib extension on Darwin. - # Their @rpath has to be replaced before gdk-pixbuf-query-loaders looks at them. - stdenv.lib.optionalString stdenv.isDarwin '' + '' + # All except one utility seem to be only useful during building. + moveToOutput "bin" "$dev" + moveToOutput "bin/gdk-pixbuf-thumbnailer" "$out" + + '' + lib.optionalString stdenv.isDarwin '' + # meson erroneously installs loaders with .dylib extension on Darwin. + # Their @rpath has to be replaced before gdk-pixbuf-query-loaders looks at them. for f in $out/${passthru.moduleDir}/*.dylib; do install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f mv $f ''${f%.dylib}.so done - '' - # All except one utility seem to be only useful during building. - + '' - moveToOutput "bin" "$dev" - moveToOutput "bin/gdk-pixbuf-thumbnailer" "$out" - '' + stdenv.lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' + '' + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' # We need to install 'loaders.cache' in lib/gdk-pixbuf-2.0/2.10.0/ $dev/bin/gdk-pixbuf-query-loaders --update-cache + '' + lib.optionalString withGtkDoc '' + # So that devhelp can find this. + mkdir -p "$devdoc/share/devhelp" + mv "$out/share/doc" "$devdoc/share/devhelp/books" ''; # The fixDarwinDylibNames hook doesn't patch binaries. - preFixup = stdenv.lib.optionalString stdenv.isDarwin '' + preFixup = lib.optionalString stdenv.isDarwin '' for f in $out/bin/* $dev/bin/*; do install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f done ''; - preInstall = '' - PATH=$PATH:$out/bin # for install script - ''; - # The tests take an excessive amount of time (> 1.5 hours) and memory (> 6 GB). inherit doCheck; setupHook = ./setup-hook.sh; + separateDebugInfo = stdenv.isLinux; + passthru = { - updateScript = gnome3.updateScript { + updateScript = gnome.updateScript { packageName = pname; + versionPolicy = "odd-unstable"; }; tests = { @@ -132,11 +134,11 @@ stdenv.mkDerivation rec { moduleDir = "lib/gdk-pixbuf-2.0/2.10.0/loaders"; }; - meta = with stdenv.lib; { + meta = with lib; { description = "A library for image loading and manipulation"; homepage = "https://gitlab.gnome.org/GNOME/gdk-pixbuf"; maintainers = [ maintainers.eelco ] ++ teams.gnome.members; - license = licenses.lgpl21; + license = licenses.lgpl21Plus; platforms = platforms.unix; }; } diff --git a/pkgs/development/libraries/gdk-pixbuf/xlib.nix b/pkgs/development/libraries/gdk-pixbuf/xlib.nix index edc5ce52563..bc4c14beb45 100644 --- a/pkgs/development/libraries/gdk-pixbuf/xlib.nix +++ b/pkgs/development/libraries/gdk-pixbuf/xlib.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib, stdenv , fetchFromGitLab , meson , ninja @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { "-Dgtk_doc=true" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Deprecated API for integrating GdkPixbuf with Xlib data types"; homepage = "https://gitlab.gnome.org/Archive/gdk-pixbuf-xlib"; maintainers = teams.gnome.members; |