Skip to content

Commit

Permalink
modemmanager: 1.18.12 → 1.20.4
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
jtojnar committed Feb 2, 2023
1 parent 57af6a6 commit 233dac2
Showing 1 changed file with 57 additions and 20 deletions.
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

0 comments on commit 233dac2

Please sign in to comment.