Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modemmanager: 1.18.12 → 1.20.4 #214086

Merged
merged 3 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 25 additions & 8 deletions pkgs/development/libraries/libmbim/default.nix
Original file line number Diff line number Diff line change
@@ -1,46 +1,63 @@
{ lib
, stdenv
, fetchurl
, fetchFromGitLab
, meson
, ninja
, pkg-config
, glib
, python3
, help2man
, systemd
, bash-completion
, withIntrospection ? stdenv.hostPlatform == stdenv.buildPlatform
, gobject-introspection
}:

stdenv.mkDerivation rec {
pname = "libmbim";
version = "1.26.4";
version = "1.28.2";

outputs = [ "out" "dev" "man" ];

src = fetchurl {
url = "https://www.freedesktop.org/software/libmbim/${pname}-${version}.tar.xz";
sha256 = "sha256-9ojOxMRYahdXX14ydEjOYvIADvagfJ5FiYc9SmhWitk=";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "mobile-broadband";
repo = "libmbim";
rev = version;
hash = "sha256-EtjUaSNBT1e/eeTX4oHzQolGrisbsGKBK8Cfl3rRQTQ=";
};

configureFlags = [
"--with-udev-base-dir=${placeholder "out"}/lib/udev"
(lib.enableFeature withIntrospection "introspection")
mesonFlags = [
"-Dudevdir=${placeholder "out"}/lib/udev"
(lib.mesonBool "introspection" withIntrospection)
];

nativeBuildInputs = [
meson
ninja
pkg-config
python3
help2man
gobject-introspection
];

buildInputs = [
glib
systemd
bash-completion
];

doCheck = true;

postPatch = ''
patchShebangs \
build-aux/mbim-codegen/mbim-codegen
'';

meta = with lib; {
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";
maintainers = teams.freedesktop.members;
platforms = platforms.linux;
license = licenses.gpl2Plus;
};
Expand Down
46 changes: 35 additions & 11 deletions pkgs/development/libraries/libqmi/default.nix
Original file line number Diff line number Diff line change
@@ -1,40 +1,61 @@
{ lib
, stdenv
, fetchurl
, fetchFromGitLab
, fetchpatch2
, meson
, ninja
, pkg-config
, gobject-introspection
, gtk-doc
, docbook-xsl-nons
, docbook_xml_dtd_43
, help2man
, glib
, python3
, libgudev
, bash-completion
, libmbim
, libqrtr-glib
}:

stdenv.mkDerivation rec {
pname = "libqmi";
version = "1.30.8";
version = "1.32.2";

outputs = [ "out" "dev" "devdoc" ];

src = fetchurl {
url = "https://www.freedesktop.org/software/libqmi/${pname}-${version}.tar.xz";
sha256 = "sha256-hiSCzp460L1l0mQzTuMRzblLnfKGO1txNjCbQbisGZA=";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
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 = [
meson
ninja
pkg-config
gobject-introspection
python3
gtk-doc
docbook-xsl-nons
docbook_xml_dtd_43
help2man
];

buildInputs = [
libgudev
bash-completion
libmbim
];

Expand All @@ -43,16 +64,19 @@ stdenv.mkDerivation rec {
libqrtr-glib
];

configureFlags = [
"--with-udev-base-dir=${placeholder "out"}/lib/udev"
"--enable-gtk-doc=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "yes" else "no"}"
"--enable-introspection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "yes" else "no"}"
mesonFlags = [
"-Dudevdir=${placeholder "out"}/lib/udev"
(lib.mesonBool "gtk_doc" (stdenv.buildPlatform == stdenv.hostPlatform))
(lib.mesonBool "introspection" (stdenv.buildPlatform == stdenv.hostPlatform))
];

enableParallelBuilding = true;

doCheck = true;

postPatch = ''
patchShebangs \
build-aux/qmi-codegen/qmi-codegen
'';

meta = with lib; {
homepage = "https://www.freedesktop.org/wiki/Software/libqmi/";
description = "Modem protocol helper library";
Expand Down
77 changes: 57 additions & 20 deletions pkgs/tools/networking/modemmanager/default.nix
Original file line number Diff line number Diff line change
@@ -1,38 +1,77 @@
{ lib, stdenv, fetchurl
, glib, udev, libgudev, polkit, ppp, gettext, pkg-config, python3
, libmbim, libqmi, systemd, vala, gobject-introspection, dbus
{ lib
, stdenv
, fetchFromGitLab
, glib
, udev
, libgudev
, polkit
, ppp
, gettext
, pkg-config
, libxslt
, python3
, libmbim
, libqmi
, systemd
, bash-completion
, meson
, ninja
, vala
, gobject-introspection
, dbus
}:

stdenv.mkDerivation rec {
pname = "modemmanager";
version = "1.18.12";
version = "1.20.4";

src = fetchurl {
url = "https://www.freedesktop.org/software/ModemManager/ModemManager-${version}.tar.xz";
sha256 = "sha256-tGTkkl2VWmyobdCGFudjsmrkbX/Tfb4oFnjjQGWx5DA=";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "mobile-broadband";
repo = "ModemManager";
rev = version;
hash = "sha256-OWP23EQ7a8rghhV7AC9yinCxRI0xwcntB5dl9XtgK6M=";
};

nativeBuildInputs = [ vala gobject-introspection gettext pkg-config ];
nativeBuildInputs = [
meson
ninja
vala
gobject-introspection
gettext
pkg-config
libxslt
];

buildInputs = [ glib udev libgudev polkit ppp libmbim libqmi systemd ];
buildInputs = [
glib
udev
libgudev
polkit
ppp
libmbim
libqmi
systemd
bash-completion
dbus
];

nativeInstallCheckInputs = [
python3 python3.pkgs.dbus-python python3.pkgs.pygobject3
python3
python3.pkgs.dbus-python
python3.pkgs.pygobject3
];

configureFlags = [
"--with-polkit"
"--with-udev-base-dir=${placeholder "out"}/lib/udev"
"--with-dbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d"
"--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
mesonFlags = [
"-Dudevdir=${placeholder "out"}/lib/udev"
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-systemd-suspend-resume"
"--with-systemd-journal"
"-Dvapi=true"
];

postPatch = ''
patchShebangs tools/test-modemmanager-service.py
patchShebangs \
tools/test-modemmanager-service.py
'';

# In Nixpkgs g-ir-scanner is patched to produce absolute paths, and
Expand All @@ -47,8 +86,6 @@ stdenv.mkDerivation rec {
'';
installCheckTarget = "check";

enableParallelBuilding = true;

meta = with lib; {
description = "WWAN modem manager, part of NetworkManager";
homepage = "https://www.freedesktop.org/wiki/Software/ModemManager/";
Expand Down