3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/gdk-pixbuf/default.nix

64 lines
1.9 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, glib, libtiff, libjpeg, libpng, libX11, gnome3
, jasper, gobjectIntrospection, doCheck ? false }:
let
2018-03-03 05:20:46 +00:00
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 {
2018-03-03 05:20:46 +00:00
name = "${pname}-${version}";
src = fetchurl {
2018-03-03 05:20:46 +00:00
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);
2018-03-03 05:20:46 +00:00
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;
};
}