64 lines
1.9 KiB
Nix
64 lines
1.9 KiB
Nix
{ stdenv, fetchurl, pkgconfig, glib, libtiff, libjpeg, libpng, libX11, gnome3
|
|
, jasper, gobjectIntrospection, doCheck ? false }:
|
|
|
|
let
|
|
pname = "gdk-pixbuf";
|
|
version = "2.36.7";
|
|
# TODO: since 2.36.8 gdk-pixbuf gets configured to use mime-type sniffing,
|
|
# which apparently requires access to shared-mime-info files during runtime.
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
name = "${pname}-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${name}.tar.xz";
|
|
sha256 = "1b6e5eef09d98f05f383014ecd3503e25dfb03d7e5b5f5904e5a65b049a6a4d8";
|
|
};
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
# !!! We might want to factor out the gdk-pixbuf-xlib subpackage.
|
|
buildInputs = [ libX11 gobjectIntrospection ];
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
propagatedBuildInputs = [ glib libtiff libjpeg libpng jasper ];
|
|
|
|
configureFlags = "--with-libjasper --with-x11"
|
|
+ stdenv.lib.optionalString (gobjectIntrospection != null) " --enable-introspection=yes"
|
|
;
|
|
|
|
# on darwin, tests don't link
|
|
preBuild = stdenv.lib.optionalString (stdenv.isDarwin && !doCheck) ''
|
|
substituteInPlace Makefile --replace "docs tests" "docs"
|
|
'';
|
|
|
|
postInstall =
|
|
# All except one utility seem to be only useful during building.
|
|
''
|
|
moveToOutput "bin" "$dev"
|
|
moveToOutput "bin/gdk-pixbuf-thumbnailer" "$out"
|
|
'';
|
|
|
|
# The tests take an excessive amount of time (> 1.5 hours) and memory (> 6 GB).
|
|
inherit (doCheck);
|
|
|
|
passthru = {
|
|
updateScript = gnome3.updateScript {
|
|
packageName = pname;
|
|
attrPath = "gdk_pixbuf";
|
|
};
|
|
};
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "A library for image loading and manipulation";
|
|
homepage = http://library.gnome.org/devel/gdk-pixbuf/;
|
|
maintainers = [ maintainers.eelco ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|