2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2023-03-04 12:14:45 +00:00
|
|
|
, fetchFromGitLab
|
|
|
|
, meson
|
|
|
|
, ninja
|
2020-08-20 17:08:02 +00:00
|
|
|
, pkg-config
|
|
|
|
, glib
|
|
|
|
, python3
|
2023-03-04 12:14:45 +00:00
|
|
|
, help2man
|
|
|
|
, bash-completion
|
2023-04-12 12:48:02 +00:00
|
|
|
, bash
|
2023-03-15 16:39:30 +00:00
|
|
|
, buildPackages
|
2023-10-19 13:55:26 +00:00
|
|
|
, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
|
2023-04-12 12:48:02 +00:00
|
|
|
, withDocs ? stdenv.hostPlatform == stdenv.buildPlatform
|
2021-06-28 23:13:55 +00:00
|
|
|
, gobject-introspection
|
2020-08-20 17:08:02 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libmbim";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "1.30.0";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
outputs = [ "out" "dev" ]
|
|
|
|
++ lib.optionals withDocs [ "man" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
owner = "mobile-broadband";
|
|
|
|
repo = "libmbim";
|
|
|
|
rev = version;
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-sHTpu9WeMZroT+1I18ObEHWSzcyj/Relyz8UNe+WawI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dudevdir=${placeholder "out"}/lib/udev"
|
|
|
|
(lib.mesonBool "introspection" withIntrospection)
|
2023-04-12 12:48:02 +00:00
|
|
|
(lib.mesonBool "man" withDocs)
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
2023-03-04 12:14:45 +00:00
|
|
|
meson
|
|
|
|
ninja
|
2020-08-20 17:08:02 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
python3
|
2023-04-12 12:48:02 +00:00
|
|
|
] ++ lib.optionals withDocs [
|
2023-03-04 12:14:45 +00:00
|
|
|
help2man
|
2023-04-12 12:48:02 +00:00
|
|
|
] ++ lib.optionals withIntrospection [
|
2020-08-20 17:08:02 +00:00
|
|
|
gobject-introspection
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
2023-03-04 12:14:45 +00:00
|
|
|
bash-completion
|
2023-04-12 12:48:02 +00:00
|
|
|
bash
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs \
|
|
|
|
build-aux/mbim-codegen/mbim-codegen
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.freedesktop.org/wiki/Software/libmbim/";
|
|
|
|
description = "Library for talking to WWAN modems and devices which speak the Mobile Interface Broadband Model (MBIM) protocol";
|
2023-03-27 19:17:25 +00:00
|
|
|
changelog = "https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/raw/${version}/NEWS";
|
2023-03-04 12:14:45 +00:00
|
|
|
maintainers = teams.freedesktop.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2021-09-18 10:52:07 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|