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
|
2023-02-16 17:41:37 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
2020-04-24 23:36:52 +00:00
|
|
|
, gtk-doc
|
2023-02-16 17:41:37 +00:00
|
|
|
, docbook-xsl-nons
|
2020-04-24 23:36:52 +00:00
|
|
|
, gobject-introspection
|
2021-08-23 08:02:39 +00:00
|
|
|
# Optional dependencies
|
|
|
|
, libjpeg
|
|
|
|
, libexif
|
|
|
|
, librsvg
|
|
|
|
, poppler
|
|
|
|
, libtiff
|
|
|
|
, fftw
|
|
|
|
, lcms2
|
2023-07-15 17:15:38 +00:00
|
|
|
, libspng
|
2021-08-23 08:02:39 +00:00
|
|
|
, libimagequant
|
|
|
|
, imagemagick
|
|
|
|
, pango
|
|
|
|
, matio
|
|
|
|
, cfitsio
|
|
|
|
, libwebp
|
|
|
|
, openexr
|
|
|
|
, openjpeg
|
|
|
|
, libjxl
|
|
|
|
, openslide
|
|
|
|
, libheif
|
2023-07-15 17:15:38 +00:00
|
|
|
, cgif
|
2023-11-16 04:20:00 +00:00
|
|
|
, libarchive
|
|
|
|
, libhwy
|
|
|
|
, testers
|
|
|
|
, nix-update-script
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "vips";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "8.15.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
outputs = [ "bin" "out" "man" "dev" ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "devdoc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libvips";
|
|
|
|
repo = "libvips";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/v${finalAttrs.version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-VQtHHitEpxv63wC41TtRWLLCKHDAK7fbrS+cByeWxT0=";
|
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
|
2023-02-16 17:41:37 +00:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
docbook-xsl-nons
|
2020-04-24 23:36:52 +00:00
|
|
|
gobject-introspection
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
2023-02-16 17:41:37 +00:00
|
|
|
gtk-doc
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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
|
|
|
|
libtiff
|
|
|
|
fftw
|
|
|
|
lcms2
|
2023-07-15 17:15:38 +00:00
|
|
|
libspng
|
2021-08-23 08:02:39 +00:00
|
|
|
libimagequant
|
|
|
|
imagemagick
|
|
|
|
pango
|
|
|
|
matio
|
|
|
|
cfitsio
|
|
|
|
libwebp
|
|
|
|
openexr
|
|
|
|
openjpeg
|
|
|
|
libjxl
|
|
|
|
openslide
|
|
|
|
libheif
|
2023-07-15 17:15:38 +00:00
|
|
|
cgif
|
2023-11-16 04:20:00 +00:00
|
|
|
libarchive
|
|
|
|
libhwy
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ApplicationServices Foundation ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Required by .pc file
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
glib
|
|
|
|
];
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dpdfium=disabled"
|
|
|
|
"-Dnifti=disabled"
|
2023-07-15 17:15:38 +00:00
|
|
|
]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optional (!stdenv.hostPlatform.isDarwin) "-Dgtk_doc=true"
|
2023-07-15 17:15:38 +00:00
|
|
|
++ lib.optional (imagemagick == null) "-Dmagick=disabled"
|
|
|
|
;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru = {
|
|
|
|
tests = {
|
|
|
|
pkg-config = testers.hasPkgConfigModules {
|
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
};
|
|
|
|
version = testers.testVersion {
|
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
command = "vips --version";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
extraArgs = [ "--version-regex" "v([0-9.]+)" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://github.com/libvips/libvips/blob/${finalAttrs.src.rev}/ChangeLog";
|
|
|
|
homepage = "https://www.libvips.org/";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Image processing system for large images";
|
|
|
|
license = licenses.lgpl2Plus;
|
2023-11-16 04:20:00 +00:00
|
|
|
maintainers = with maintainers; [ kovirobi anthonyroussel ];
|
|
|
|
pkgConfigModules = [ "vips" "vips-cpp" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
2023-11-16 04:20:00 +00:00
|
|
|
mainProgram = "vips";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-11-16 04:20:00 +00:00
|
|
|
})
|