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
30 inherit (lib) optional optionals;
32 stdenv.mkDerivation (finalAttrs: {
37 url = "mirror://sourceforge/enlightenment/${finalAttrs.pname}-${finalAttrs.version}.tar.xz";
38 hash = "sha256-jCTS0YnE1a5gLb8vwPuxF6qSPqtsiDBB8P7spOjGd04=";
42 libjpeg libtiff giflib libpng
43 bzip2 freetype libid3tag
44 ] ++ optionals x11Support [ xorg.libXft xorg.libXext ]
45 ++ optional heifSupport libheif
46 ++ optional svgSupport librsvg
47 ++ optional webpSupport libwebp
48 ++ optional jxlSupport libjxl
49 ++ optional psSupport libspectre;
51 nativeBuildInputs = [ pkg-config ];
53 enableParallelBuilding = true;
55 # Do not build amd64 assembly code on Darwin, because it fails to compile
56 # with unknow directive errors
57 configureFlags = optional stdenv.isDarwin "--enable-amd64=no"
58 ++ optional (!svgSupport) "--without-svg"
59 ++ optional (!heifSupport) "--without-heif"
60 ++ optional (!x11Support) "--without-x";
62 outputs = [ "bin" "out" "dev" ];
74 pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
76 updateScript = gitUpdater {
77 # No nicer place to find latest release.
78 url = "https://git.enlightenment.org/old/legacy-imlib2.git";
84 description = "Image manipulation library";
87 This is the Imlib 2 library - a library that does image file loading and
88 saving as well as rendering, manipulation, arbitrary polygon support, etc.
89 It does ALL of these operations FAST. Imlib2 also tries to be highly
90 intelligent about doing them, so writing naive programs can be done
91 easily, without sacrificing speed.
94 homepage = "https://docs.enlightenment.org/api/imlib2/html";
95 changelog = "https://git.enlightenment.org/old/legacy-imlib2/raw/tag/v${finalAttrs.version}/ChangeLog";
96 license = licenses.imlib2;
97 pkgConfigModules = [ "imlib2" ];
98 platforms = platforms.unix;
99 maintainers = with maintainers; [ ];