diff --git a/pkgs/development/libraries/graphene/default.nix b/pkgs/development/libraries/graphene/default.nix index a0bfc6f017ad..7c4c072a7003 100644 --- a/pkgs/development/libraries/graphene/default.nix +++ b/pkgs/development/libraries/graphene/default.nix @@ -19,7 +19,8 @@ stdenv.mkDerivation rec { pname = "graphene"; version = "1.10.6"; - outputs = [ "out" "devdoc" "installedTests" ]; + outputs = [ "out" ] + ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" "installedTests" ]; src = fetchFromGitHub { owner = "ebassi"; @@ -33,6 +34,10 @@ stdenv.mkDerivation rec { ./0001-meson-add-options-for-tests-installation-dirs.patch ]; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ docbook_xml_dtd_43 docbook_xsl @@ -47,7 +52,6 @@ stdenv.mkDerivation rec { buildInputs = [ glib - gobject-introspection ]; checkInputs = [ @@ -55,7 +59,8 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Dgtk_doc=true" + "-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" + "-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}" "-Dinstalled_test_datadir=${placeholder "installedTests"}/share" "-Dinstalled_test_bindir=${placeholder "installedTests"}/libexec" ]; @@ -64,6 +69,7 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs tests/gen-installed-test.py + '' + lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) '' PATH=${python3.withPackages (pp: [ pp.pygobject3 pp.tappy ])}/bin:$PATH patchShebangs tests/introspection.py '';