2021-08-22 16:38:11 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2021-01-17 10:17:16 +01:00
|
|
|
, pkg-config
|
2020-03-04 01:23:43 +01:00
|
|
|
, glib
|
|
|
|
, libxml2
|
|
|
|
, expat
|
|
|
|
, ApplicationServices
|
2021-05-11 22:54:27 +02:00
|
|
|
, Foundation
|
2021-08-22 16:38:11 +02:00
|
|
|
, python3
|
2020-03-04 01:23:43 +01:00
|
|
|
, fetchFromGitHub
|
2022-12-22 20:23:29 +01:00
|
|
|
, meson
|
|
|
|
, ninja
|
2020-03-04 01:23:43 +01:00
|
|
|
, gtk-doc
|
2022-12-22 20:23:29 +01:00
|
|
|
, docbook-xsl-nons
|
2020-03-04 01:23:43 +01:00
|
|
|
, gobject-introspection
|
2021-08-22 16:38:11 +02:00
|
|
|
# Optional dependencies
|
|
|
|
, libjpeg
|
|
|
|
, libexif
|
|
|
|
, librsvg
|
|
|
|
, poppler
|
|
|
|
, libgsf
|
|
|
|
, libtiff
|
|
|
|
, fftw
|
|
|
|
, lcms2
|
2023-07-08 16:07:50 +02:00
|
|
|
, libspng
|
2021-08-22 16:38:11 +02:00
|
|
|
, libimagequant
|
|
|
|
, imagemagick
|
|
|
|
, pango
|
|
|
|
, orc
|
|
|
|
, matio
|
|
|
|
, cfitsio
|
|
|
|
, libwebp
|
|
|
|
, openexr
|
|
|
|
, openjpeg
|
|
|
|
, libjxl
|
|
|
|
, openslide
|
|
|
|
, libheif
|
2023-07-12 10:24:16 +02:00
|
|
|
, cgif
|
2015-01-14 00:49:58 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "vips";
|
2023-08-28 00:55:41 +02:00
|
|
|
version = "8.14.4";
|
2015-01-14 00:49:58 +01:00
|
|
|
|
2023-02-07 08:23:33 +01:00
|
|
|
outputs = [ "bin" "out" "man" "dev" ] ++ lib.optionals (!stdenv.isDarwin) [ "devdoc" ];
|
2020-03-04 01:32:41 +01:00
|
|
|
|
2018-10-08 01:09:51 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libvips";
|
|
|
|
repo = "libvips";
|
|
|
|
rev = "v${version}";
|
2023-08-28 00:55:41 +02:00
|
|
|
hash = "sha256-y2Tyi8rxal3s3jLURRGPuCAUuHITRPl1+zJZDp557+I=";
|
2019-06-03 10:49:48 +02:00
|
|
|
# Remove unicode file names which leads to different checksums on HFS+
|
|
|
|
# vs. other filesystems because of unicode normalisation.
|
2022-05-17 21:10:33 +02:00
|
|
|
postFetch = ''
|
2019-06-03 10:49:48 +02:00
|
|
|
rm -r $out/test/test-suite/images/
|
|
|
|
'';
|
2015-01-14 00:49:58 +01:00
|
|
|
};
|
|
|
|
|
2020-03-04 01:23:43 +01:00
|
|
|
nativeBuildInputs = [
|
2021-01-17 10:17:16 +01:00
|
|
|
pkg-config
|
2022-12-22 20:23:29 +01:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
docbook-xsl-nons
|
2020-03-04 01:23:43 +01:00
|
|
|
gobject-introspection
|
2023-02-07 08:23:33 +01:00
|
|
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
|
|
|
gtk-doc
|
2020-03-04 01:23:43 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
libxml2
|
2021-08-22 16:38:11 +02:00
|
|
|
expat
|
|
|
|
(python3.withPackages (p: [ p.pycairo ]))
|
|
|
|
# Optional dependencies
|
2020-03-04 01:23:43 +01:00
|
|
|
libjpeg
|
|
|
|
libexif
|
2020-11-25 04:42:24 +01:00
|
|
|
librsvg
|
2021-08-22 16:38:11 +02:00
|
|
|
poppler
|
|
|
|
libgsf
|
|
|
|
libtiff
|
|
|
|
fftw
|
|
|
|
lcms2
|
2023-07-08 16:07:50 +02:00
|
|
|
libspng
|
2021-08-22 16:38:11 +02:00
|
|
|
libimagequant
|
|
|
|
imagemagick
|
|
|
|
pango
|
|
|
|
orc
|
|
|
|
matio
|
|
|
|
cfitsio
|
|
|
|
libwebp
|
|
|
|
openexr
|
|
|
|
openjpeg
|
|
|
|
libjxl
|
|
|
|
openslide
|
|
|
|
libheif
|
2023-07-12 10:24:16 +02:00
|
|
|
cgif
|
2021-08-22 16:38:11 +02:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [ ApplicationServices Foundation ];
|
2015-01-14 00:49:58 +01:00
|
|
|
|
2020-03-04 01:28:09 +01:00
|
|
|
# Required by .pc file
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
glib
|
|
|
|
];
|
|
|
|
|
2022-12-22 20:23:29 +01:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dpdfium=disabled"
|
|
|
|
"-Dnifti=disabled"
|
2023-07-13 02:43:59 +02:00
|
|
|
]
|
|
|
|
++ lib.optional (!stdenv.isDarwin) "-Dgtk_doc=true"
|
|
|
|
++ lib.optional (imagemagick == null) "-Dmagick=disabled"
|
|
|
|
;
|
2018-10-08 01:09:51 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2023-02-07 08:05:10 +01:00
|
|
|
changelog = "https://github.com/libvips/libvips/blob/${src.rev}/ChangeLog";
|
2019-06-03 10:49:48 +02:00
|
|
|
homepage = "https://libvips.github.io/libvips/";
|
2015-01-14 00:49:58 +01:00
|
|
|
description = "Image processing system for large images";
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
maintainers = with maintainers; [ kovirobi ];
|
2018-08-21 09:53:12 +02:00
|
|
|
platforms = platforms.unix;
|
2015-01-14 00:49:58 +01:00
|
|
|
};
|
|
|
|
}
|