1 { lib, stdenv, fetchurl
3 , libjpeg, libtiff, giflib, libpng, libwebp, libjxl
5 # imlib2 can load images from ID3 tags.
6 , libid3tag, librsvg, libheif
7 , freetype , bzip2, pkg-config
27 inherit (lib) optional optionals;
29 stdenv.mkDerivation rec {
34 url = "mirror://sourceforge/enlightenment/${pname}-${version}.tar.xz";
35 hash = "sha256-SiJAOL//vl1NJQxE4F9O5a4k3P74OVsWd8cVxY92TUM=";
39 libjpeg libtiff giflib libpng
40 bzip2 freetype libid3tag
41 ] ++ optionals x11Support [ xorg.libXft xorg.libXext ]
42 ++ optional heifSupport libheif
43 ++ optional svgSupport librsvg
44 ++ optional webpSupport libwebp
45 ++ optional jxlSupport libjxl
46 ++ optional psSupport libspectre;
48 nativeBuildInputs = [ pkg-config ];
50 enableParallelBuilding = true;
52 # Do not build amd64 assembly code on Darwin, because it fails to compile
53 # with unknow directive errors
54 configureFlags = optional stdenv.isDarwin "--enable-amd64=no"
55 ++ optional (!svgSupport) "--without-svg"
56 ++ optional (!heifSupport) "--without-heif"
57 ++ optional (!x11Support) "--without-x";
59 outputs = [ "bin" "out" "dev" ];
73 description = "Image manipulation library";
76 This is the Imlib 2 library - a library that does image file loading and
77 saving as well as rendering, manipulation, arbitrary polygon support, etc.
78 It does ALL of these operations FAST. Imlib2 also tries to be highly
79 intelligent about doing them, so writing naive programs can be done
80 easily, without sacrificing speed.
83 homepage = "https://docs.enlightenment.org/api/imlib2/html";
84 changelog = "https://git.enlightenment.org/legacy/imlib2.git/plain/ChangeLog?h=v${version}";
85 license = licenses.imlib2;
86 platforms = platforms.unix;
87 maintainers = with maintainers; [ spwhitt ];