Skip to content

Commit

Permalink
vips: 8.15.3 -> 8.15.5 (#351503)
Browse files Browse the repository at this point in the history
  • Loading branch information
jopejoe1 authored Nov 2, 2024
2 parents 81e157f + cf5ffc8 commit ff77e45
Show file tree
Hide file tree
Showing 4 changed files with 187 additions and 152 deletions.
169 changes: 169 additions & 0 deletions pkgs/by-name/vi/vips/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
{
lib,
stdenv,
fetchFromGitHub,

# Native build inputs
docbook-xsl-nons,
gobject-introspection,
gtk-doc,
meson,
ninja,
pkg-config,

# Build inputs
ApplicationServices,
expat,
Foundation,
glib,
libxml2,
python3,

# Optional dependencies
cfitsio,
cgif,
fftw,
imagemagick,
lcms2,
libarchive,
libexif,
libheif,
libhwy,
libimagequant,
libjpeg,
libjxl,
librsvg,
libspng,
libtiff,
libwebp,
matio,
openexr,
openjpeg,
openslide,
pango,
poppler,

# passthru
testers,
nix-update-script,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "vips";
version = "8.15.5";

outputs = [
"bin"
"out"
"man"
"dev"
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "devdoc" ];

src = fetchFromGitHub {
owner = "libvips";
repo = "libvips";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-Lwe4lu3kS1WxgbM0eRfrMf/UIpDebvooHKvyVv7lq24=";
# 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 =
[
docbook-xsl-nons
gobject-introspection
meson
ninja
pkg-config
]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
gtk-doc
];

buildInputs =
[
glib
libxml2
expat
(python3.withPackages (p: [ p.pycairo ]))

# Optional dependencies
cfitsio
cgif
fftw
imagemagick
lcms2
libarchive
libexif
libheif
libhwy
libimagequant
libjpeg
libjxl
librsvg
libspng
libtiff
libwebp
matio
openexr
openjpeg
openslide
pango
poppler
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
ApplicationServices
Foundation
];

# Required by .pc file
propagatedBuildInputs = [
glib
];

mesonFlags =
[
(lib.mesonEnable "pdfium" false)
(lib.mesonEnable "nifti" false)
]
++ lib.optional (!stdenv.hostPlatform.isDarwin) (lib.mesonBool "gtk_doc" true)
++ lib.optional (imagemagick == null) (lib.mesonEnable "magick" false);

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.]+)"
];
};
};

meta = with lib; {
changelog = "https://github.com/libvips/libvips/blob/${finalAttrs.src.rev}/ChangeLog";
homepage = "https://www.libvips.org/";
description = "Image processing system for large images";
license = licenses.lgpl2Plus;
maintainers = with maintainers; [
kovirobi
anthonyroussel
];
pkgConfigModules = [
"vips"
"vips-cpp"
];
platforms = platforms.unix;
mainProgram = "vips";
};
})
29 changes: 17 additions & 12 deletions pkgs/development/python-modules/pyvips/default.nix
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
lib,
stdenv,
buildPythonPackage,
pythonOlder,
cffi,
fetchFromGitHub,
pytestCheckHook,
glib,
vips,
cffi,
pkgconfig, # from pythonPackages
pkg-config, # from pkgs
lib,
pkgconfig, # from pythonPackages
pytestCheckHook,
pythonOlder,
setuptools,
vips,
}:

buildPythonPackage rec {
pname = "pyvips";
version = "2.2.1";
format = "setuptools";
version = "2.2.3";
pyproject = true;

disabled = pythonOlder "3.7";

src = fetchFromGitHub {
owner = "libvips";
repo = "pyvips";
rev = "v${version}";
hash = "sha256-9S7h3bkm+QP78cpemYS7l3c8t+wXsJ5MUAP2T50R/Mc=";
rev = "refs/tags/v${version}";
hash = "sha256-EGB1cOR1pVCXGjRj1NLj4Mk3kIy8luRqk3gGJqVNs7U=";
};

nativeBuildInputs = [
pkgconfig
pkg-config
];

Expand All @@ -36,7 +36,12 @@ buildPythonPackage rec {
vips
];

propagatedBuildInputs = [ cffi ];
build-system = [
pkgconfig
setuptools
];

dependencies = [ cffi ];

env = lib.optionalAttrs stdenv.cc.isClang {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-function-pointer-types";
Expand Down
139 changes: 0 additions & 139 deletions pkgs/tools/graphics/vips/default.nix

This file was deleted.

2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37832,7 +37832,7 @@ with pkgs;
vimb-unwrapped = callPackage ../applications/networking/browsers/vimb { };
vimb = wrapFirefox vimb-unwrapped { };

vips = callPackage ../tools/graphics/vips {
vips = callPackage ../by-name/vi/vips/package.nix {
inherit (darwin.apple_sdk.frameworks) ApplicationServices Foundation;
};

Expand Down

0 comments on commit ff77e45

Please sign in to comment.