json-glib: re-disable introspection if no emulator
e.g. when cross compiling from Linux to FreeBSD.
Fixes: 1bd8727a4c
("various: enable gobject-introspection when cross-compiling")
This commit is contained in:
parent
430a9ba130
commit
ffb1b62b5f
@ -7,6 +7,8 @@
|
||||
, nixosTests
|
||||
, pkg-config
|
||||
, gettext
|
||||
, withIntrospection ? stdenv.hostPlatform.emulatorAvailable buildPackages
|
||||
, buildPackages
|
||||
, gobject-introspection
|
||||
, gi-docgen
|
||||
, libxslt
|
||||
@ -18,7 +20,8 @@ stdenv.mkDerivation rec {
|
||||
pname = "json-glib";
|
||||
version = "1.6.6";
|
||||
|
||||
outputs = [ "out" "dev" "devdoc" "installedTests" ];
|
||||
outputs = [ "out" "dev" "installedTests" ]
|
||||
++ lib.optional withIntrospection "devdoc";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
@ -43,10 +46,11 @@ stdenv.mkDerivation rec {
|
||||
gettext
|
||||
glib
|
||||
libxslt
|
||||
gobject-introspection
|
||||
gi-docgen
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
fixDarwinDylibNames
|
||||
] ++ lib.optionals withIntrospection [
|
||||
gobject-introspection
|
||||
gi-docgen
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
@ -55,6 +59,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
mesonFlags = [
|
||||
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
||||
(lib.mesonEnable "introspection" withIntrospection)
|
||||
(lib.mesonEnable "gtk_doc" withIntrospection)
|
||||
];
|
||||
|
||||
# Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
|
||||
|
Loading…
Reference in New Issue
Block a user