2021-08-23 08:02:39 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, glib
|
|
|
|
, libxml2
|
|
|
|
, expat
|
|
|
|
, ApplicationServices
|
2021-05-20 23:08:51 +00:00
|
|
|
, Foundation
|
2021-08-23 08:02:39 +00:00
|
|
|
, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, autoreconfHook
|
|
|
|
, gtk-doc
|
|
|
|
, gobject-introspection
|
2021-08-23 08:02:39 +00:00
|
|
|
# Optional dependencies
|
|
|
|
, libjpeg
|
|
|
|
, libexif
|
|
|
|
, librsvg
|
|
|
|
, poppler
|
|
|
|
, libgsf
|
|
|
|
, libtiff
|
|
|
|
, fftw
|
|
|
|
, lcms2
|
|
|
|
, libpng
|
|
|
|
, libimagequant
|
|
|
|
, imagemagick
|
|
|
|
, pango
|
|
|
|
, orc
|
|
|
|
, matio
|
|
|
|
, cfitsio
|
|
|
|
, libwebp
|
|
|
|
, openexr
|
|
|
|
, openjpeg
|
|
|
|
, libjxl
|
|
|
|
, openslide
|
|
|
|
, libheif
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "vips";
|
2021-12-30 13:39:12 +00:00
|
|
|
version = "8.12.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
outputs = [ "bin" "out" "man" "dev" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libvips";
|
|
|
|
repo = "libvips";
|
|
|
|
rev = "v${version}";
|
2021-12-30 13:39:12 +00:00
|
|
|
sha256 = "sha256-Zo1Y4pYa+o55+ASrAiDUO7SAC4zpcAniEKkTFvIoU6o=";
|
2020-04-24 23:36:52 +00:00
|
|
|
# Remove unicode file names which leads to different checksums on HFS+
|
|
|
|
# vs. other filesystems because of unicode normalisation.
|
|
|
|
extraPostFetch = ''
|
|
|
|
rm -r $out/test/test-suite/images/
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
autoreconfHook
|
|
|
|
gtk-doc
|
|
|
|
gobject-introspection
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
libxml2
|
2021-08-23 08:02:39 +00:00
|
|
|
expat
|
|
|
|
(python3.withPackages (p: [ p.pycairo ]))
|
|
|
|
# Optional dependencies
|
2020-04-24 23:36:52 +00:00
|
|
|
libjpeg
|
|
|
|
libexif
|
2020-11-30 08:33:03 +00:00
|
|
|
librsvg
|
2021-08-23 08:02:39 +00:00
|
|
|
poppler
|
|
|
|
libgsf
|
|
|
|
libtiff
|
|
|
|
fftw
|
|
|
|
lcms2
|
2020-04-24 23:36:52 +00:00
|
|
|
libpng
|
2021-08-23 08:02:39 +00:00
|
|
|
libimagequant
|
|
|
|
imagemagick
|
|
|
|
pango
|
|
|
|
orc
|
|
|
|
matio
|
|
|
|
cfitsio
|
|
|
|
libwebp
|
|
|
|
openexr
|
|
|
|
openjpeg
|
|
|
|
libjxl
|
|
|
|
openslide
|
|
|
|
libheif
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [ ApplicationServices Foundation ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Required by .pc file
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
glib
|
|
|
|
];
|
|
|
|
|
|
|
|
autoreconfPhase = ''
|
|
|
|
NOCONFIGURE=1 ./autogen.sh
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://libvips.github.io/libvips/";
|
|
|
|
description = "Image processing system for large images";
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
maintainers = with maintainers; [ kovirobi ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|