Skip to content

Commit 014f8fb

Browse files
authored
vips: Fix cross build for FreeBSD (#387409)
2 parents d084ce7 + 652b84a commit 014f8fb

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

pkgs/by-name/vi/vips/package.nix

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
meson,
1111
ninja,
1212
pkg-config,
13+
buildPackages,
1314

1415
# Build inputs
1516
ApplicationServices,
@@ -42,6 +43,9 @@
4243
openslide,
4344
pango,
4445
poppler,
46+
withIntrospection ?
47+
lib.meta.availableOn stdenv.hostPlatform gobject-introspection
48+
&& stdenv.hostPlatform.emulatorAvailable buildPackages,
4549

4650
# passthru
4751
testers,
@@ -57,7 +61,7 @@ stdenv.mkDerivation (finalAttrs: {
5761
"out"
5862
"man"
5963
"dev"
60-
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "devdoc" ];
64+
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isFreeBSD) [ "devdoc" ];
6165

6266
src = fetchFromGitHub {
6367
owner = "libvips";
@@ -79,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: {
7983
ninja
8084
pkg-config
8185
]
82-
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
86+
++ lib.optionals (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isFreeBSD) [
8387
gtk-doc
8488
];
8589

@@ -128,8 +132,11 @@ stdenv.mkDerivation (finalAttrs: {
128132
[
129133
(lib.mesonEnable "pdfium" false)
130134
(lib.mesonEnable "nifti" false)
135+
(lib.mesonEnable "introspection" withIntrospection)
131136
]
132-
++ lib.optional (!stdenv.hostPlatform.isDarwin) (lib.mesonBool "gtk_doc" true)
137+
++ lib.optional (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isFreeBSD) (
138+
lib.mesonBool "gtk_doc" true
139+
)
133140
++ lib.optional (imagemagick == null) (lib.mesonEnable "magick" false);
134141

135142
passthru = {

0 commit comments

Comments
 (0)