2018-03-04 21:06:08 +00:00
|
|
|
{ stdenv, fetchurl, meson, ninja, pkgconfig, gettext, python3, libxml2, libxslt, docbook_xsl
|
|
|
|
, docbook_xml_dtd_43, gtk-doc, glib, libtiff, libjpeg, libpng, libX11, gnome3
|
|
|
|
, jasper, shared-mime-info, libintlOrEmpty, gobjectIntrospection, doCheck ? false, makeWrapper }:
|
2011-09-20 07:21:56 +01:00
|
|
|
|
2013-10-05 19:21:13 +01:00
|
|
|
let
|
2018-03-03 05:20:46 +00:00
|
|
|
pname = "gdk-pixbuf";
|
2018-03-04 21:06:08 +00:00
|
|
|
version = "2.36.11";
|
2013-10-05 19:21:13 +01:00
|
|
|
in
|
2012-05-16 22:58:57 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2018-03-03 05:20:46 +00:00
|
|
|
name = "${pname}-${version}";
|
2011-09-20 07:21:56 +01:00
|
|
|
|
2012-01-06 23:03:37 +00:00
|
|
|
src = fetchurl {
|
2018-03-03 05:20:46 +00:00
|
|
|
url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${name}.tar.xz";
|
2018-03-04 21:06:08 +00:00
|
|
|
sha256 = "1wz2vpciwdpdv612s8kbww08q80hgcs5dxrfsxp1a4q44n3snqmf";
|
2011-09-20 07:21:56 +01:00
|
|
|
};
|
|
|
|
|
2018-03-04 21:06:08 +00:00
|
|
|
outputs = [ "out" "dev" "man" "devdoc" ];
|
2012-08-27 03:53:19 +01:00
|
|
|
|
2014-02-27 19:37:28 +00:00
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
2012-08-27 03:53:19 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2011-09-20 07:21:56 +01:00
|
|
|
# !!! We might want to factor out the gdk-pixbuf-xlib subpackage.
|
2018-03-04 21:06:08 +00:00
|
|
|
buildInputs = [ libX11 ] ++ stdenv.lib.optional (!stdenv.isDarwin) shared-mime-info ++ libintlOrEmpty;
|
2011-09-20 07:21:56 +01:00
|
|
|
|
2018-03-04 21:06:08 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson ninja pkgconfig gettext python3 libxml2 libxslt docbook_xsl docbook_xml_dtd_43
|
|
|
|
gtk-doc gobjectIntrospection makeWrapper
|
|
|
|
];
|
2011-09-20 07:21:56 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ glib libtiff libjpeg libpng jasper ];
|
|
|
|
|
2018-03-04 21:06:08 +00:00
|
|
|
mesonFlags = [
|
|
|
|
# with_ & enable_will be removed in the future
|
|
|
|
"-Dwith_docs=true"
|
|
|
|
"-Denable_jasper=true"
|
|
|
|
"-Dx11=true" # will be added in the future (default atm)
|
|
|
|
"-Dwith_gir=${if gobjectIntrospection != null then "true" else "false"}"
|
|
|
|
];
|
2016-12-28 19:16:12 +00:00
|
|
|
|
2018-03-04 21:06:08 +00:00
|
|
|
postPatch = ''
|
|
|
|
chmod +x build-aux/* # patchShebangs only applies to executables
|
|
|
|
patchShebangs build-aux
|
2015-10-19 18:12:01 +01:00
|
|
|
'';
|
|
|
|
|
2016-12-28 19:16:12 +00:00
|
|
|
postInstall =
|
|
|
|
# All except one utility seem to be only useful during building.
|
|
|
|
''
|
|
|
|
moveToOutput "bin" "$dev"
|
|
|
|
moveToOutput "bin/gdk-pixbuf-thumbnailer" "$out"
|
2018-03-04 21:06:08 +00:00
|
|
|
|
|
|
|
# We require runtime access to shared-mime-info
|
|
|
|
${stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
|
|
|
for f in $dev/bin/*; do
|
|
|
|
wrapProgram $f --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
|
|
|
done
|
|
|
|
wrapProgram $out/bin/gdk-pixbuf-thumbnailer --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
|
|
|
''}
|
|
|
|
|
|
|
|
# We need to install 'loaders.cache' in lib/gdk-pixbuf-2.0/2.10.0/
|
|
|
|
$dev/bin/gdk-pixbuf-query-loaders --update-cache
|
2016-12-28 19:16:12 +00:00
|
|
|
'';
|
2011-09-20 07:21:56 +01:00
|
|
|
|
2015-08-21 11:56:55 +01:00
|
|
|
# The tests take an excessive amount of time (> 1.5 hours) and memory (> 6 GB).
|
2015-09-20 08:04:22 +01:00
|
|
|
inherit (doCheck);
|
2013-10-05 19:21:13 +01:00
|
|
|
|
2018-03-03 05:20:46 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome3.updateScript {
|
|
|
|
packageName = pname;
|
|
|
|
attrPath = "gdk_pixbuf";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-10-28 11:05:37 +00:00
|
|
|
meta = with stdenv.lib; {
|
2011-09-20 07:21:56 +01:00
|
|
|
description = "A library for image loading and manipulation";
|
|
|
|
homepage = http://library.gnome.org/devel/gdk-pixbuf/;
|
2015-10-28 11:05:37 +00:00
|
|
|
maintainers = [ maintainers.eelco ];
|
|
|
|
platforms = platforms.unix;
|
2011-09-20 07:21:56 +01:00
|
|
|
};
|
|
|
|
}
|
2015-10-28 11:05:37 +00:00
|
|
|
|