nixpkgs/pkgs/tools/graphics/vips/default.nix

121 lines
2.1 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, pkg-config
2020-03-04 01:23:43 +01:00
, glib
, libxml2
, expat
, ApplicationServices
2021-05-11 22:54:27 +02:00
, Foundation
, python3
2020-03-04 01:23:43 +01:00
, fetchFromGitHub
, meson
, ninja
2020-03-04 01:23:43 +01:00
, gtk-doc
, docbook-xsl-nons
2020-03-04 01:23:43 +01:00
, gobject-introspection
# Optional dependencies
, libjpeg
, libexif
, librsvg
, poppler
, libgsf
, libtiff
, fftw
, lcms2
, libspng
, libimagequant
, imagemagick
, pango
, orc
, matio
, cfitsio
, libwebp
, openexr
, openjpeg
, libjxl
, openslide
, libheif
2023-07-12 10:24:16 +02:00
, cgif
}:
stdenv.mkDerivation rec {
pname = "vips";
2023-08-28 00:55:41 +02:00
version = "8.14.4";
outputs = [ "bin" "out" "man" "dev" ] ++ lib.optionals (!stdenv.isDarwin) [ "devdoc" ];
2020-03-04 01:32:41 +01:00
src = fetchFromGitHub {
owner = "libvips";
repo = "libvips";
rev = "v${version}";
2023-08-28 00:55:41 +02:00
hash = "sha256-y2Tyi8rxal3s3jLURRGPuCAUuHITRPl1+zJZDp557+I=";
# 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 = ''
rm -r $out/test/test-suite/images/
'';
};
2020-03-04 01:23:43 +01:00
nativeBuildInputs = [
pkg-config
meson
ninja
docbook-xsl-nons
2020-03-04 01:23:43 +01:00
gobject-introspection
] ++ lib.optionals (!stdenv.isDarwin) [
gtk-doc
2020-03-04 01:23:43 +01:00
];
buildInputs = [
glib
libxml2
expat
(python3.withPackages (p: [ p.pycairo ]))
# Optional dependencies
2020-03-04 01:23:43 +01:00
libjpeg
libexif
librsvg
poppler
libgsf
libtiff
fftw
lcms2
libspng
libimagequant
imagemagick
pango
orc
matio
cfitsio
libwebp
openexr
openjpeg
libjxl
openslide
libheif
2023-07-12 10:24:16 +02:00
cgif
] ++ lib.optionals stdenv.isDarwin [ ApplicationServices Foundation ];
# Required by .pc file
propagatedBuildInputs = [
glib
];
mesonFlags = [
"-Dpdfium=disabled"
"-Dnifti=disabled"
]
++ lib.optional (!stdenv.isDarwin) "-Dgtk_doc=true"
++ lib.optional (imagemagick == null) "-Dmagick=disabled"
;
meta = with lib; {
changelog = "https://github.com/libvips/libvips/blob/${src.rev}/ChangeLog";
homepage = "https://libvips.github.io/libvips/";
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;
};
}