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
|
, nixosTests
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, gettext
|
, gettext
|
||||||
|
, withIntrospection ? stdenv.hostPlatform.emulatorAvailable buildPackages
|
||||||
|
, buildPackages
|
||||||
, gobject-introspection
|
, gobject-introspection
|
||||||
, gi-docgen
|
, gi-docgen
|
||||||
, libxslt
|
, libxslt
|
||||||
|
@ -18,7 +20,8 @@ stdenv.mkDerivation rec {
|
||||||
pname = "json-glib";
|
pname = "json-glib";
|
||||||
version = "1.6.6";
|
version = "1.6.6";
|
||||||
|
|
||||||
outputs = [ "out" "dev" "devdoc" "installedTests" ];
|
outputs = [ "out" "dev" "installedTests" ]
|
||||||
|
++ lib.optional withIntrospection "devdoc";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||||
|
@ -43,10 +46,11 @@ stdenv.mkDerivation rec {
|
||||||
gettext
|
gettext
|
||||||
glib
|
glib
|
||||||
libxslt
|
libxslt
|
||||||
gobject-introspection
|
|
||||||
gi-docgen
|
|
||||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
fixDarwinDylibNames
|
fixDarwinDylibNames
|
||||||
|
] ++ lib.optionals withIntrospection [
|
||||||
|
gobject-introspection
|
||||||
|
gi-docgen
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
@ -55,6 +59,8 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
"-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)
|
# Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
|
||||||
|
|
Loading…
Reference in a new issue