Jan Tojnar 2023-02-02 00:28:14 +01:00
parent a1e8dfcdf4
commit 57af6a6e7d

View file

@ -1,40 +1,61 @@
{ lib { lib
, stdenv , stdenv
, fetchurl , fetchFromGitLab
, fetchpatch2
, meson
, ninja
, pkg-config , pkg-config
, gobject-introspection , gobject-introspection
, gtk-doc , gtk-doc
, docbook-xsl-nons , docbook-xsl-nons
, docbook_xml_dtd_43 , docbook_xml_dtd_43
, help2man
, glib , glib
, python3 , python3
, libgudev , libgudev
, bash-completion
, libmbim , libmbim
, libqrtr-glib , libqrtr-glib
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libqmi"; pname = "libqmi";
version = "1.30.8"; version = "1.32.2";
outputs = [ "out" "dev" "devdoc" ]; outputs = [ "out" "dev" "devdoc" ];
src = fetchurl { src = fetchFromGitLab {
url = "https://www.freedesktop.org/software/libqmi/${pname}-${version}.tar.xz"; domain = "gitlab.freedesktop.org";
sha256 = "sha256-hiSCzp460L1l0mQzTuMRzblLnfKGO1txNjCbQbisGZA="; owner = "mobile-broadband";
repo = "libqmi";
rev = version;
hash = "sha256-XIbeWgkPiJL8hN8Rb6KFt5Q5sG3KsiEQr0EnhwmI6h8=";
}; };
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=";
})
];
nativeBuildInputs = [ nativeBuildInputs = [
meson
ninja
pkg-config pkg-config
gobject-introspection gobject-introspection
python3 python3
gtk-doc gtk-doc
docbook-xsl-nons docbook-xsl-nons
docbook_xml_dtd_43 docbook_xml_dtd_43
help2man
]; ];
buildInputs = [ buildInputs = [
libgudev libgudev
bash-completion
libmbim libmbim
]; ];
@ -43,16 +64,19 @@ stdenv.mkDerivation rec {
libqrtr-glib libqrtr-glib
]; ];
configureFlags = [ mesonFlags = [
"--with-udev-base-dir=${placeholder "out"}/lib/udev" "-Dudevdir=${placeholder "out"}/lib/udev"
"--enable-gtk-doc=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "yes" else "no"}" (lib.mesonBool "gtk_doc" (stdenv.buildPlatform == stdenv.hostPlatform))
"--enable-introspection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "yes" else "no"}" (lib.mesonBool "introspection" (stdenv.buildPlatform == stdenv.hostPlatform))
]; ];
enableParallelBuilding = true;
doCheck = true; doCheck = true;
postPatch = ''
patchShebangs \
build-aux/qmi-codegen/qmi-codegen
'';
meta = with lib; { meta = with lib; {
homepage = "https://www.freedesktop.org/wiki/Software/libqmi/"; homepage = "https://www.freedesktop.org/wiki/Software/libqmi/";
description = "Modem protocol helper library"; description = "Modem protocol helper library";