2021-03-19 17:17:44 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2023-03-04 12:14:45 +00:00
|
|
|
, fetchFromGitLab
|
|
|
|
, meson
|
|
|
|
, ninja
|
2021-03-19 17:17:44 +00:00
|
|
|
, pkg-config
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk-doc
|
|
|
|
, docbook-xsl-nons
|
|
|
|
, docbook_xml_dtd_43
|
2023-03-04 12:14:45 +00:00
|
|
|
, help2man
|
2021-03-19 17:17:44 +00:00
|
|
|
, glib
|
|
|
|
, python3
|
2023-05-24 13:37:59 +00:00
|
|
|
, mesonEmulatorHook
|
2021-03-19 17:17:44 +00:00
|
|
|
, libgudev
|
2023-03-04 12:14:45 +00:00
|
|
|
, bash-completion
|
2021-03-19 17:17:44 +00:00
|
|
|
, libmbim
|
|
|
|
, libqrtr-glib
|
2023-05-24 13:37:59 +00:00
|
|
|
, buildPackages
|
2023-10-19 13:55:26 +00:00
|
|
|
, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
|
2023-05-24 13:37:59 +00:00
|
|
|
, withMan ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
|
2021-03-19 17:17:44 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libqmi";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "1.32.4";
|
2021-03-19 17:17:44 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
outputs = [ "out" "dev" ]
|
2023-05-24 13:37:59 +00:00
|
|
|
++ lib.optional withIntrospection "devdoc";
|
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 = "libqmi";
|
|
|
|
rev = version;
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-cczGvoD+2+G6uiAt0Iv1BO4/FqzO9bkqhFsEwOfp7qw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-03-04 12:14:45 +00:00
|
|
|
meson
|
|
|
|
ninja
|
2020-07-18 16:06:22 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
python3
|
2023-05-24 13:37:59 +00:00
|
|
|
] ++ lib.optionals withMan [
|
|
|
|
help2man
|
|
|
|
] ++ lib.optionals withIntrospection [
|
|
|
|
gobject-introspection
|
2021-03-19 17:17:44 +00:00
|
|
|
gtk-doc
|
|
|
|
docbook-xsl-nons
|
|
|
|
docbook_xml_dtd_43
|
2023-05-24 13:37:59 +00:00
|
|
|
] ++ lib.optionals (withIntrospection && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
|
|
|
mesonEmulatorHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2023-03-04 12:14:45 +00:00
|
|
|
bash-completion
|
2020-04-24 23:36:52 +00:00
|
|
|
libmbim
|
2023-05-24 13:37:59 +00:00
|
|
|
] ++ lib.optionals withIntrospection [
|
|
|
|
libgudev
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
glib
|
2023-05-24 13:37:59 +00:00
|
|
|
] ++ lib.optionals withIntrospection [
|
2021-03-19 17:17:44 +00:00
|
|
|
libqrtr-glib
|
|
|
|
];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dudevdir=${placeholder "out"}/lib/udev"
|
2023-05-24 13:37:59 +00:00
|
|
|
(lib.mesonBool "gtk_doc" withIntrospection)
|
|
|
|
(lib.mesonBool "introspection" withIntrospection)
|
|
|
|
(lib.mesonBool "man" withMan)
|
|
|
|
(lib.mesonBool "qrtr" withIntrospection)
|
|
|
|
(lib.mesonBool "udev" withIntrospection)
|
2021-03-19 17:17:44 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs \
|
|
|
|
build-aux/qmi-codegen/qmi-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/libqmi/";
|
|
|
|
description = "Modem protocol helper library";
|
2021-03-19 17:17:44 +00:00
|
|
|
maintainers = teams.freedesktop.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2021-03-19 17:17:44 +00:00
|
|
|
license = with licenses; [
|
|
|
|
# Library
|
|
|
|
lgpl2Plus
|
|
|
|
# Tools
|
|
|
|
gpl2Plus
|
|
|
|
];
|
2021-09-18 10:52:07 +00:00
|
|
|
changelog = "https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/blob/${version}/NEWS";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|