From 03b564110f5ecb8ff1af7e5f45bc1d7456bd7240 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Wed, 5 Mar 2025 14:29:57 -0700 Subject: [PATCH 1/2] vips: fix use of gobject-introspection gobject-introspection fails unless it can emulate the platform it's introspecting for. The added clause is copied from other packages that use it. --- pkgs/by-name/vi/vips/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/vi/vips/package.nix b/pkgs/by-name/vi/vips/package.nix index 11b1176e90b4..cbfffd772b13 100644 --- a/pkgs/by-name/vi/vips/package.nix +++ b/pkgs/by-name/vi/vips/package.nix @@ -10,6 +10,7 @@ meson, ninja, pkg-config, + buildPackages, # Build inputs ApplicationServices, @@ -42,6 +43,9 @@ openslide, pango, poppler, + withIntrospection ? + lib.meta.availableOn stdenv.hostPlatform gobject-introspection + && stdenv.hostPlatform.emulatorAvailable buildPackages, # passthru testers, @@ -128,6 +132,7 @@ stdenv.mkDerivation (finalAttrs: { [ (lib.mesonEnable "pdfium" false) (lib.mesonEnable "nifti" false) + (lib.mesonEnable "introspection" withIntrospection) ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) (lib.mesonBool "gtk_doc" true) ++ lib.optional (imagemagick == null) (lib.mesonEnable "magick" false); From 652b84a9a56cb0e85782c9b431502089635dd928 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Wed, 5 Mar 2025 14:30:17 -0700 Subject: [PATCH 2/2] vips: fix build on FreeBSD This dependency doesn't work on Darwin and it doesn't work on FreeBSD either. --- pkgs/by-name/vi/vips/package.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/vi/vips/package.nix b/pkgs/by-name/vi/vips/package.nix index cbfffd772b13..c76857b0a371 100644 --- a/pkgs/by-name/vi/vips/package.nix +++ b/pkgs/by-name/vi/vips/package.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation (finalAttrs: { "out" "man" "dev" - ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "devdoc" ]; + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isFreeBSD) [ "devdoc" ]; src = fetchFromGitHub { owner = "libvips"; @@ -83,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: { ninja pkg-config ] - ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isFreeBSD) [ gtk-doc ]; @@ -134,7 +134,9 @@ stdenv.mkDerivation (finalAttrs: { (lib.mesonEnable "nifti" false) (lib.mesonEnable "introspection" withIntrospection) ] - ++ lib.optional (!stdenv.hostPlatform.isDarwin) (lib.mesonBool "gtk_doc" true) + ++ lib.optional (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isFreeBSD) ( + lib.mesonBool "gtk_doc" true + ) ++ lib.optional (imagemagick == null) (lib.mesonEnable "magick" false); passthru = {