2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
2020-04-24 23:36:52 +00:00
|
|
|
# Image file formats
|
|
|
|
, libjpeg, libtiff, giflib, libpng, libwebp
|
|
|
|
# imlib2 can load images from ID3 tags.
|
|
|
|
, libid3tag
|
2021-02-05 17:12:51 +00:00
|
|
|
, freetype , bzip2, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, x11Support ? true, xlibsWrapper ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2021-02-05 17:12:51 +00:00
|
|
|
inherit (lib) optional;
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "imlib2";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "1.7.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-02-10 20:34:41 +00:00
|
|
|
url = "mirror://sourceforge/enlightenment/${pname}-${version}.tar.xz";
|
|
|
|
hash = "sha256-RY2DAKp6bUzjU1GDi7pdn9+wiES9WxU8WTjs/kP/Ngo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libjpeg libtiff giflib libpng libwebp
|
|
|
|
bzip2 freetype libid3tag
|
|
|
|
] ++ optional x11Support xlibsWrapper;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
# Do not build amd64 assembly code on Darwin, because it fails to compile
|
|
|
|
# with unknow directive errors
|
|
|
|
configureFlags = optional stdenv.isDarwin "--enable-amd64=no"
|
|
|
|
++ optional (!x11Support) "--without-x";
|
|
|
|
|
|
|
|
outputs = [ "bin" "out" "dev" ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00: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.
|
|
|
|
'';
|
|
|
|
|
|
|
|
homepage = "https://docs.enlightenment.org/api/imlib2/html";
|
2022-02-10 20:34:41 +00:00
|
|
|
changelog = "https://git.enlightenment.org/legacy/imlib2.git/plain/ChangeLog?h=v${version}";
|
|
|
|
license = licenses.imlib2;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ spwhitt ];
|
|
|
|
};
|
|
|
|
}
|