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

110 lines
1.8 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
2020-03-04 01:27:23 +01:00
, fetchpatch
2020-03-04 01:23:43 +01:00
, autoreconfHook
, gtk-doc
, 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";
2021-12-22 05:41:25 +01:00
version = "8.12.1";
2020-03-04 01:32:41 +01:00
outputs = [ "bin" "out" "man" "dev" ];
src = fetchFromGitHub {
owner = "libvips";
repo = "libvips";
rev = "v${version}";
2021-12-22 05:41:25 +01:00
sha256 = "sha256-Zo1Y4pYa+o55+ASrAiDUO7SAC4zpcAniEKkTFvIoU6o=";
# Remove unicode file names which leads to different checksums on HFS+
# vs. other filesystems because of unicode normalisation.
extraPostFetch = ''
rm -r $out/test/test-suite/images/
'';
};
2020-03-04 01:23:43 +01:00
nativeBuildInputs = [
pkg-config
2020-03-04 01:23:43 +01:00
autoreconfHook
gtk-doc
gobject-introspection
];
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
2020-03-04 01:23:43 +01:00
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
];
autoreconfPhase = ''
2020-03-04 01:27:23 +01:00
NOCONFIGURE=1 ./autogen.sh
'';
meta = with lib; {
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;
};
}