1{ lib
2, stdenv
3, fetchurl
4, pkg-config
5, glib
6, python3
7, systemd
8, withIntrospection ? stdenv.hostPlatform == stdenv.buildPlatform
9, gobject-introspection
10}:
11
12stdenv.mkDerivation rec {
13 pname = "libmbim";
14 version = "1.26.4";
15
16 outputs = [ "out" "dev" "man" ];
17
18 src = fetchurl {
19 url = "https://www.freedesktop.org/software/libmbim/${pname}-${version}.tar.xz";
20 sha256 = "sha256-9ojOxMRYahdXX14ydEjOYvIADvagfJ5FiYc9SmhWitk=";
21 };
22
23 configureFlags = [
24 "--with-udev-base-dir=${placeholder "out"}/lib/udev"
25 (lib.enableFeature withIntrospection "introspection")
26 ];
27
28 nativeBuildInputs = [
29 pkg-config
30 python3
31 gobject-introspection
32 ];
33
34 buildInputs = [
35 glib
36 systemd
37 ];
38
39 doCheck = true;
40
41 meta = with lib; {
42 homepage = "https://www.freedesktop.org/wiki/Software/libmbim/";
43 description = "Library for talking to WWAN modems and devices which speak the Mobile Interface Broadband Model (MBIM) protocol";
44 platforms = platforms.linux;
45 license = licenses.gpl2Plus;
46 };
47}