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/pango/default.nix | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'pkgs/development/libraries/pango/default.nix') diff --git a/pkgs/development/libraries/pango/default.nix b/pkgs/development/libraries/pango/default.nix index 13dd24b5482..16db7be3135 100644 --- a/pkgs/development/libraries/pango/default.nix +++ b/pkgs/development/libraries/pango/default.nix @@ -16,26 +16,21 @@ , ninja , glib , python3 -, x11Support? !stdenv.isDarwin, libXft -, withIntrospection ? (stdenv.buildPlatform == stdenv.hostPlatform) , gobject-introspection -, withDocs ? (stdenv.buildPlatform == stdenv.hostPlatform) +, x11Support? !stdenv.isDarwin, libXft }: stdenv.mkDerivation rec { pname = "pango"; version = "1.50.7"; - outputs = [ "bin" "out" "dev" ] - ++ lib.optionals withDocs [ "devdoc" ]; + outputs = [ "bin" "out" "dev" "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; sha256 = "BHfzaaPUxpXfcpmmmJ3ABHVqf03ifuysQFxnkLfjrTM="; }; - strictDeps = !withIntrospection; - depsBuildBuild = [ pkg-config ]; @@ -44,9 +39,7 @@ stdenv.mkDerivation rec { meson ninja glib # for glib-mkenum pkg-config - ] ++ lib.optionals withIntrospection [ gobject-introspection - ] ++ lib.optionals withDocs [ gi-docgen python3 ]; @@ -71,8 +64,7 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Dgtk_doc=${lib.boolToString withDocs}" - "-Dintrospection=${if withIntrospection then "enabled" else "disabled"}" + "-Dgtk_doc=true" ] ++ lib.optionals (!x11Support) [ "-Dxft=disabled" # only works with x11 ]; @@ -82,9 +74,20 @@ stdenv.mkDerivation rec { fontDirectories = [ freefont_ttf ]; }; + # 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 meson.build \ + --replace "dependency('gi-docgen', ver" "dependency('gi-docgen', native:true, ver" + + substituteInPlace docs/meson.build \ + --replace "'gi-docgen', req" "'gi-docgen', native:true, req" + ''; + doCheck = false; # test-font: FAIL - postFixup = lib.optionalString withDocs '' + postFixup = '' # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. moveToOutput "share/doc" "$devdoc" ''; -- cgit 1.4.1