From 233dac2934f685e87e3f9a6480c3b66027c069b2 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 2 Feb 2023 00:15:12 +0100 Subject: [PATCH] =?UTF-8?q?modemmanager:=201.18.12=20=E2=86=92=201.20.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Tarballs no longer available. - Autotools no longer supported. - Formatting the expression. - Dropped default configure flags (`--with-polkit` implies `yes`, which gets interpreted as `strict` on Autotools, which is the default with Meson; `systemd_suspend_resume` and `systemd_journal` default to `true` with Meson) - Dropped flags for paths that can be obtained from pkg-config (does not work for udev). https://lists.freedesktop.org/archives/modemmanager-devel/2022-October/009455.html https://lists.freedesktop.org/archives/wayland-devel/2022-November/042515.html https://lists.freedesktop.org/archives/modemmanager-devel/2022-November/009525.html https://lists.freedesktop.org/archives/modemmanager-devel/2022-December/009563.html --- .../tools/networking/modemmanager/default.nix | 83 ++++++++++++++----- 1 file changed, 60 insertions(+), 23 deletions(-) diff --git a/pkgs/tools/networking/modemmanager/default.nix b/pkgs/tools/networking/modemmanager/default.nix index 01c70f3bf3f5..326e71075215 100644 --- a/pkgs/tools/networking/modemmanager/default.nix +++ b/pkgs/tools/networking/modemmanager/default.nix @@ -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 ]; - - buildInputs = [ glib udev libgudev polkit ppp libmbim libqmi systemd ]; - - nativeInstallCheckInputs = [ - python3 python3.pkgs.dbus-python python3.pkgs.pygobject3 + nativeBuildInputs = [ + meson + ninja + vala + gobject-introspection + gettext + pkg-config + libxslt ]; - 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" + buildInputs = [ + glib + udev + libgudev + polkit + ppp + libmbim + libqmi + systemd + bash-completion + dbus + ]; + + nativeInstallCheckInputs = [ + python3 + python3.pkgs.dbus-python + python3.pkgs.pygobject3 + ]; + + 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 @@ -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/";