anchor.diff:      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).
  
positive.code: , pkg-config
  , gettext
  , python3
  , libxml2
  , libxslt
  , docbook-xsl-nons
  , docbook_xml_dtd_43
  , gtk-doc
  , glib
  , libtiff
  , libjpeg
  
negative.code:     substituteInPlace tests/meson.build --subst-var-by installedtestsprefix "$installedTests"
    '';
  
    preInstall = ''
      PATH=$PATH:$out/bin # for install script
    '';
  
    postInstall =
      ''
        # All except one utility seem to be only useful during building.
        moveToOutput "bin" "$dev"
        moveToOutput "bin/gdk-pixbuf-thumbnailer" "$out"
  
        # So that devhelp can find this.
        mkdir -p "$devdoc/share/devhelp"
        mv "$out/share/doc" "$devdoc/share/devhelp/books"
      '' + 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
      '' + 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
  