From 7de760af6ce9e2df89b738f0c8ca3639da231119 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Wed, 22 Feb 2023 14:31:24 +0100 Subject: [PATCH] libmbim: support cross We can now enable introspection without much issues. We have to disable help2man man page generation though, since it tries to run the cross-compiled binary, which doesn't work. enable strictDeps checked with diffing --- pkgs/development/libraries/libmbim/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libmbim/default.nix b/pkgs/development/libraries/libmbim/default.nix index 55bfc17239e..8f19d0d2e6e 100644 --- a/pkgs/development/libraries/libmbim/default.nix +++ b/pkgs/development/libraries/libmbim/default.nix @@ -9,8 +9,10 @@ , help2man , systemd , bash-completion +, bash , buildPackages , withIntrospection ? stdenv.hostPlatform.emulatorAvailable buildPackages +, withDocs ? stdenv.hostPlatform == stdenv.buildPlatform , gobject-introspection }: @@ -18,7 +20,8 @@ stdenv.mkDerivation rec { pname = "libmbim"; version = "1.28.2"; - outputs = [ "out" "dev" "man" ]; + outputs = [ "out" "dev" ] + ++ lib.optionals withDocs [ "man" ]; src = fetchFromGitLab { domain = "gitlab.freedesktop.org"; @@ -31,14 +34,19 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Dudevdir=${placeholder "out"}/lib/udev" (lib.mesonBool "introspection" withIntrospection) + (lib.mesonBool "man" withDocs) ]; + strictDeps = true; + nativeBuildInputs = [ meson ninja pkg-config python3 + ] ++ lib.optionals withDocs [ help2man + ] ++ lib.optionals withIntrospection [ gobject-introspection ]; @@ -46,6 +54,7 @@ stdenv.mkDerivation rec { glib systemd bash-completion + bash ]; doCheck = true;