From 322e4d8fa39af8fdd3f085313a4f2bec7b2bd6c0 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 30 Jul 2022 21:51:03 +0300 Subject: [PATCH] graphene: build gir when cross --- pkgs/development/libraries/graphene/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/graphene/default.nix b/pkgs/development/libraries/graphene/default.nix index b883c549da54..baf42430c299 100644 --- a/pkgs/development/libraries/graphene/default.nix +++ b/pkgs/development/libraries/graphene/default.nix @@ -5,6 +5,7 @@ , nix-update-script , pkg-config , meson +, mesonEmulatorHook , ninja , python3 , mutest @@ -21,8 +22,8 @@ stdenv.mkDerivation rec { pname = "graphene"; version = "1.10.8"; - outputs = [ "out" ] - ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" "installedTests" ]; + outputs = [ "out" "dev" "devdoc" ] + ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ "installedTests" ]; src = fetchFromGitHub { owner = "ebassi"; @@ -59,6 +60,8 @@ stdenv.mkDerivation rec { gobject-introspection python3 makeWrapper + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ @@ -70,8 +73,8 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" - "-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}" + "-Dgtk_doc=true" + "-Dintrospection=enabled" "-Dinstalled_test_datadir=${placeholder "installedTests"}/share" "-Dinstalled_test_bindir=${placeholder "installedTests"}/libexec" ]; @@ -80,7 +83,6 @@ 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 '';