From 1bd8727a4ca5cd4ed33a3e9349a42637f0f3a3bc Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 7 Jul 2022 21:34:37 +0300 Subject: various: enable gobject-introspection when cross-compiling and fix cross in some --- pkgs/development/libraries/json-glib/default.nix | 27 +++++++++++++----------- 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'pkgs/development/libraries/json-glib') diff --git a/pkgs/development/libraries/json-glib/default.nix b/pkgs/development/libraries/json-glib/default.nix index e041908f3f48d..e1676a69551d0 100644 --- a/pkgs/development/libraries/json-glib/default.nix +++ b/pkgs/development/libraries/json-glib/default.nix @@ -6,10 +6,10 @@ , ninja , pkg-config , gettext -, withIntrospection ? stdenv.buildPlatform == stdenv.hostPlatform , gobject-introspection -, fixDarwinDylibNames , gi-docgen +, libxslt +, fixDarwinDylibNames , gnome }: @@ -17,8 +17,7 @@ stdenv.mkDerivation rec { pname = "json-glib"; version = "1.6.6"; - outputs = [ "out" "dev" ] - ++ lib.optional withIntrospection "devdoc"; + outputs = [ "out" "dev" "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; @@ -37,22 +36,26 @@ stdenv.mkDerivation rec { pkg-config gettext glib - ] ++ lib.optional stdenv.hostPlatform.isDarwin [ - fixDarwinDylibNames - ] ++ lib.optionals withIntrospection [ + libxslt gobject-introspection gi-docgen + ] ++ lib.optional stdenv.hostPlatform.isDarwin [ + fixDarwinDylibNames ]; propagatedBuildInputs = [ glib ]; - mesonFlags = lib.optionals (!withIntrospection) [ - "-Dintrospection=disabled" - # gi-docgen relies on introspection data - "-Dgtk_doc=disabled" - ]; + + # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake) + # it should be a build-time dep for build + # TODO: send upstream + postPatch = '' + substituteInPlace doc/meson.build \ + --replace "'gi-docgen', ver" "'gi-docgen', native:true, ver" \ + --replace "'gi-docgen', req" "'gi-docgen', native:true, req" + ''; doCheck = true; -- cgit 1.4.1