Imlib2: Add JPEGXL and Postscript support, make webp support optional (#186492)

Co-authored-by: Robert Scott <code@humanleg.org.uk>
This commit is contained in:
Daniel Nagy 2022-08-24 23:32:48 +02:00 committed by GitHub
parent f3d30b608a
commit abaa4b5e51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 7 deletions

View File

@ -1,14 +1,16 @@
{ lib, stdenv, fetchurl
# Image file formats
, libjpeg, libtiff, giflib, libpng, libwebp
, libjpeg, libtiff, giflib, libpng, libwebp, libjxl
, libspectre
# imlib2 can load images from ID3 tags.
, libid3tag, librsvg, libheif
, freetype , bzip2, pkg-config
, x11Support ? true, xlibsWrapper ? null
# Compilation error on Darwin with librsvg. For more information see:
# https://github.com/NixOS/nixpkgs/pull/166452#issuecomment-1090725613
, svgSupport ? !stdenv.isDarwin
, heifSupport ? !stdenv.isDarwin
, svgSupport ? false
, heifSupport ? false
, webpSupport ? false
, jxlSupport ? false
, psSupport ? false
# for passthru.tests
, libcaca
@ -33,11 +35,14 @@ stdenv.mkDerivation rec {
};
buildInputs = [
libjpeg libtiff giflib libpng libwebp
libjpeg libtiff giflib libpng
bzip2 freetype libid3tag
] ++ optional x11Support xlibsWrapper
++ optional heifSupport libheif
++ optional svgSupport librsvg;
++ optional svgSupport librsvg
++ optional webpSupport libwebp
++ optional jxlSupport libjxl
++ optional psSupport libspectre;
nativeBuildInputs = [ pkg-config ];

View File

@ -18653,6 +18653,15 @@ with pkgs;
iml = callPackage ../development/libraries/iml { };
imlib2 = callPackage ../development/libraries/imlib2 { };
imlib2Full = imlib2.override {
# Compilation error on Darwin with librsvg. For more information see:
# https://github.com/NixOS/nixpkgs/pull/166452#issuecomment-1090725613
svgSupport = !stdenv.isDarwin;
heifSupport = !stdenv.isDarwin;
webpSupport = true;
jxlSupport = true;
psSupport = true;
};
imlib2-nox = imlib2.override {
x11Support = false;
};