1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
{ lib
, stdenv
, pkg-config
, glib
, libxml2
, expat
, ApplicationServices
, Foundation
, python3
, fetchFromGitHub
, meson
, ninja
, gtk-doc
, docbook-xsl-nons
, gobject-introspection
# Optional dependencies
, libjpeg
, libexif
, librsvg
, poppler
, libgsf
, libtiff
, fftw
, lcms2
, libpng
, libimagequant
, imagemagick
, pango
, orc
, matio
, cfitsio
, libwebp
, openexr
, openjpeg
, libjxl
, openslide
, libheif
}:
stdenv.mkDerivation rec {
pname = "vips";
version = "8.14.1";
outputs = [ "bin" "out" "man" "dev" ] ++ lib.optionals (!stdenv.isDarwin) [ "devdoc" ];
src = fetchFromGitHub {
owner = "libvips";
repo = "libvips";
rev = "v${version}";
hash = "sha256-ajGVSVjnv78S/Xd3Aqn0N87I7m39DWKZHAQjwbog+5U=";
# Remove unicode file names which leads to different checksums on HFS+
# vs. other filesystems because of unicode normalisation.
postFetch = ''
rm -r $out/test/test-suite/images/
'';
};
nativeBuildInputs = [
pkg-config
meson
ninja
docbook-xsl-nons
gobject-introspection
] ++ lib.optionals (!stdenv.isDarwin) [
gtk-doc
];
buildInputs = [
glib
libxml2
expat
(python3.withPackages (p: [ p.pycairo ]))
# Optional dependencies
libjpeg
libexif
librsvg
poppler
libgsf
libtiff
fftw
lcms2
libpng
libimagequant
imagemagick
pango
orc
matio
cfitsio
libwebp
openexr
openjpeg
libjxl
openslide
libheif
] ++ lib.optionals stdenv.isDarwin [ ApplicationServices Foundation ];
# Required by .pc file
propagatedBuildInputs = [
glib
];
mesonFlags = [
"-Dcgif=disabled"
"-Dspng=disabled"
"-Dpdfium=disabled"
"-Dnifti=disabled"
] ++ lib.optionals (!stdenv.isDarwin) [
"-Dgtk_doc=true"
];
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 ];
platforms = platforms.unix;
};
}
|