diff --git a/pkgs/development/libraries/json-glib/default.nix b/pkgs/development/libraries/json-glib/default.nix index efac3690851..4b54ccc0664 100644 --- a/pkgs/development/libraries/json-glib/default.nix +++ b/pkgs/development/libraries/json-glib/default.nix @@ -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)