1{ stdenv, fetchurl, xlibsWrapper, libjpeg, libtiff, giflib, libpng, bzip2, pkgconfig }:
2
3stdenv.mkDerivation rec {
4 name = "imlib2-1.4.9";
5
6 src = fetchurl {
7 url = "mirror://sourceforge/enlightenment/${name}.tar.bz2";
8 sha256 = "08809xxk2555yj6glixzw9a0x3x8cx55imd89kj3r0h152bn8a3x";
9 };
10
11 buildInputs = [ xlibsWrapper libjpeg libtiff giflib libpng bzip2 ];
12
13 nativeBuildInputs = [ pkgconfig ];
14
15 enableParallelBuilding = true;
16
17 preConfigure = ''
18 substituteInPlace imlib2-config.in \
19 --replace "@my_libs@" ""
20 '';
21
22 # Do not build amd64 assembly code on Darwin, because it fails to compile
23 # with unknow directive errors
24 configureFlags = if stdenv.isDarwin then [ "--enable-amd64=no" ] else null;
25
26 meta = {
27 description = "Image manipulation library";
28
29 longDescription = ''
30 This is the Imlib 2 library - a library that does image file loading and
31 saving as well as rendering, manipulation, arbitrary polygon support, etc.
32 It does ALL of these operations FAST. Imlib2 also tries to be highly
33 intelligent about doing them, so writing naive programs can be done
34 easily, without sacrificing speed.
35 '';
36
37 license = stdenv.lib.licenses.free;
38 platforms = stdenv.lib.platforms.unix;
39 maintainers = with stdenv.lib.maintainers; [ spwhitt ];
40 };
41}