2021-01-22 00:00:13 +07:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
2020-02-05 19:27:16 +01:00
|
|
|
# Image file formats
|
2022-08-24 23:32:48 +02:00
|
|
|
libjpeg,
|
|
|
|
libtiff,
|
|
|
|
giflib,
|
|
|
|
libpng,
|
|
|
|
libwebp,
|
|
|
|
libjxl,
|
|
|
|
libspectre,
|
2020-02-05 19:27:16 +01:00
|
|
|
# imlib2 can load images from ID3 tags.
|
2022-04-04 18:45:13 +02:00
|
|
|
libid3tag,
|
|
|
|
librsvg,
|
|
|
|
libheif,
|
2021-01-18 22:50:56 -08:00
|
|
|
freetype,
|
|
|
|
bzip2,
|
|
|
|
pkg-config,
|
2022-10-04 13:35:02 -07:00
|
|
|
x11Support ? true,
|
2022-09-26 23:48:36 +02:00
|
|
|
webpSupport ? true,
|
2022-08-24 23:32:48 +02:00
|
|
|
svgSupport ? false,
|
|
|
|
heifSupport ? false,
|
|
|
|
jxlSupport ? false,
|
|
|
|
psSupport ? false,
|
2022-04-03 19:56:00 +01:00
|
|
|
|
|
|
|
# for passthru.tests
|
|
|
|
libcaca,
|
|
|
|
diffoscopeMinimal,
|
|
|
|
feh,
|
|
|
|
icewm,
|
|
|
|
openbox,
|
|
|
|
fluxbox,
|
|
|
|
enlightenment,
|
2022-10-04 13:35:02 -07:00
|
|
|
xorg,
|
2023-02-12 14:25:37 -05:00
|
|
|
testers,
|
2023-09-24 12:40:08 +01:00
|
|
|
|
|
|
|
gitUpdater,
|
2020-02-05 19:27:16 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2022-10-04 13:35:02 -07:00
|
|
|
inherit (lib) optional optionals;
|
2020-02-05 19:27:16 +01:00
|
|
|
in
|
2023-02-12 14:25:37 -05:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-02-05 19:27:16 +01:00
|
|
|
pname = "imlib2";
|
2025-04-07 23:01:38 +01:00
|
|
|
version = "1.12.5";
|
2013-12-10 23:20:23 +01:00
|
|
|
|
2007-03-05 13:44:27 +00:00
|
|
|
src = fetchurl {
|
2024-07-12 20:17:48 -04:00
|
|
|
url = "mirror://sourceforge/enlightenment/imlib2-${finalAttrs.version}.tar.xz";
|
2025-04-07 23:01:38 +01:00
|
|
|
hash = "sha256-+iMV8oN5tDCm5mBbQoSwe+BqPvQi1PXhybskcUxM9t0=";
|
2007-03-05 13:44:27 +00:00
|
|
|
};
|
2013-12-10 23:20:23 +01:00
|
|
|
|
2020-02-05 19:27:16 +01:00
|
|
|
buildInputs =
|
|
|
|
[
|
2022-08-24 23:32:48 +02:00
|
|
|
libjpeg
|
|
|
|
libtiff
|
|
|
|
giflib
|
|
|
|
libpng
|
2022-05-07 13:02:26 +01:00
|
|
|
bzip2
|
|
|
|
freetype
|
|
|
|
libid3tag
|
2022-10-04 13:35:02 -07:00
|
|
|
]
|
|
|
|
++ optionals x11Support [
|
|
|
|
xorg.libXft
|
|
|
|
xorg.libXext
|
|
|
|
]
|
2022-05-07 13:02:26 +01:00
|
|
|
++ optional heifSupport libheif
|
2022-08-24 23:32:48 +02:00
|
|
|
++ optional svgSupport librsvg
|
|
|
|
++ optional webpSupport libwebp
|
|
|
|
++ optional jxlSupport libjxl
|
|
|
|
++ optional psSupport libspectre;
|
2011-09-26 13:13:45 +00:00
|
|
|
|
2021-01-18 22:50:56 -08:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2011-09-26 13:13:45 +00:00
|
|
|
|
2016-05-03 22:32:57 -03:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-04-07 18:39:05 -04:00
|
|
|
# Do not build amd64 assembly code on Darwin, because it fails to compile
|
2025-06-02 15:54:57 +02:00
|
|
|
# with unknown directive errors
|
2016-11-22 21:08:19 +01:00
|
|
|
configureFlags =
|
|
|
|
optional stdenv.hostPlatform.isDarwin "--enable-amd64=no"
|
2022-05-07 13:02:26 +01:00
|
|
|
++ optional (!svgSupport) "--without-svg"
|
|
|
|
++ optional (!heifSupport) "--without-heif"
|
2016-11-22 21:08:19 +01:00
|
|
|
++ optional (!x11Support) "--without-x";
|
2015-04-07 18:39:05 -04:00
|
|
|
|
2017-09-27 00:14:38 +03:00
|
|
|
outputs = [
|
|
|
|
"bin"
|
|
|
|
"out"
|
|
|
|
"dev"
|
|
|
|
];
|
2016-11-22 22:11:25 +01:00
|
|
|
|
2023-09-24 12:40:08 +01:00
|
|
|
passthru = {
|
|
|
|
tests = {
|
|
|
|
inherit
|
|
|
|
libcaca
|
|
|
|
diffoscopeMinimal
|
|
|
|
feh
|
|
|
|
icewm
|
|
|
|
openbox
|
|
|
|
fluxbox
|
|
|
|
enlightenment
|
|
|
|
;
|
|
|
|
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
|
|
};
|
|
|
|
updateScript = gitUpdater {
|
|
|
|
# No nicer place to find latest release.
|
|
|
|
url = "https://git.enlightenment.org/old/legacy-imlib2.git";
|
|
|
|
rev-prefix = "v";
|
|
|
|
};
|
2022-04-03 19:56:00 +01:00
|
|
|
};
|
|
|
|
|
2021-01-22 00:00:13 +07:00
|
|
|
meta = with lib; {
|
2015-04-07 18:39:05 -04:00
|
|
|
description = "Image manipulation library";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
This is the Imlib 2 library - a library that does image file loading and
|
|
|
|
saving as well as rendering, manipulation, arbitrary polygon support, etc.
|
|
|
|
It does ALL of these operations FAST. Imlib2 also tries to be highly
|
|
|
|
intelligent about doing them, so writing naive programs can be done
|
|
|
|
easily, without sacrificing speed.
|
|
|
|
'';
|
|
|
|
|
2020-02-05 19:27:16 +01:00
|
|
|
homepage = "https://docs.enlightenment.org/api/imlib2/html";
|
2023-09-02 04:20:00 +00:00
|
|
|
changelog = "https://git.enlightenment.org/old/legacy-imlib2/raw/tag/v${finalAttrs.version}/ChangeLog";
|
2022-01-22 18:51:55 +01:00
|
|
|
license = licenses.imlib2;
|
2023-02-12 14:25:37 -05:00
|
|
|
pkgConfigModules = [ "imlib2" ];
|
2016-11-22 21:08:19 +01:00
|
|
|
platforms = platforms.unix;
|
2024-07-28 16:44:11 +02:00
|
|
|
maintainers = [ ];
|
2011-09-26 13:13:45 +00:00
|
|
|
};
|
2023-02-12 14:25:37 -05:00
|
|
|
})
|