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/";