Commit 7de760af authored by Rick van Schijndel's avatar Rick van Schijndel Committed by Artturin
Browse files

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
parent c49c81e1
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -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;