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";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "8.13.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
outputs = [ "bin" "out" "man" "dev" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libvips";
|
|
|
|
repo = "libvips";
|
|
|
|
rev = "v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-N2jq68Vs/D+lZcIJVdjBLVaz2gK/TwqKeNfHUWdS3NA=";
|
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.
|
2022-06-16 17:23:12 +00:00
|
|
|
postFetch = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|