2021-03-19 17:17:44 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2023-03-04 12:14:45 +00:00
|
|
|
, fetchFromGitLab
|
|
|
|
, fetchpatch2
|
|
|
|
, 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
|
|
|
|
, libgudev
|
2023-03-04 12:14:45 +00:00
|
|
|
, bash-completion
|
2021-03-19 17:17:44 +00:00
|
|
|
, libmbim
|
|
|
|
, libqrtr-glib
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libqmi";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "1.32.2";
|
2021-03-19 17:17:44 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" "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;
|
|
|
|
hash = "sha256-XIbeWgkPiJL8hN8Rb6KFt5Q5sG3KsiEQr0EnhwmI6h8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
patches = [
|
|
|
|
# Fix pkg-config file missing qrtr in Requires.
|
|
|
|
# https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/issues/99
|
|
|
|
(fetchpatch2 {
|
|
|
|
url = "https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/commit/7d08150910974c6bd2c29f887c2c6d4a3526e085.patch";
|
|
|
|
hash = "sha256-LFrlm2ZqLqewLGO2FxL5kFYbZ7HaxdxvVHsFHYSgZ4Y=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
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
|
|
|
|
gobject-introspection
|
2020-04-24 23:36:52 +00:00
|
|
|
python3
|
2021-03-19 17:17:44 +00:00
|
|
|
gtk-doc
|
|
|
|
docbook-xsl-nons
|
|
|
|
docbook_xml_dtd_43
|
2023-03-04 12:14:45 +00:00
|
|
|
help2man
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libgudev
|
2023-03-04 12:14:45 +00:00
|
|
|
bash-completion
|
2020-04-24 23:36:52 +00:00
|
|
|
libmbim
|
|
|
|
];
|
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
glib
|
|
|
|
libqrtr-glib
|
|
|
|
];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dudevdir=${placeholder "out"}/lib/udev"
|
|
|
|
(lib.mesonBool "gtk_doc" (stdenv.buildPlatform == stdenv.hostPlatform))
|
|
|
|
(lib.mesonBool "introspection" (stdenv.buildPlatform == stdenv.hostPlatform))
|
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
|
|
|
};
|
|
|
|
}
|