2021-08-05 21:33:18 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
2021-07-14 22:03:04 +00:00
|
|
|
, glib, udev, libgudev, polkit, ppp, gettext, pkg-config, python3
|
|
|
|
, libmbim, libqmi, systemd, vala, gobject-introspection, dbus
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-09-18 10:52:07 +00:00
|
|
|
pname = "modemmanager";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "1.18.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-14 22:03:04 +00:00
|
|
|
url = "https://www.freedesktop.org/software/ModemManager/ModemManager-${version}.tar.xz";
|
2022-04-15 01:41:22 +00:00
|
|
|
sha256 = "sha256-1PgEsxz1BCOcXx1Jc8YglcAMuh7pq7UDcY2sbRRqRwo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ vala gobject-introspection gettext pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ glib udev libgudev polkit ppp libmbim libqmi systemd ];
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
installCheckInputs = [
|
|
|
|
python3 python3.pkgs.dbus-python python3.pkgs.pygobject3
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
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"
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--with-systemd-suspend-resume"
|
|
|
|
"--with-systemd-journal"
|
|
|
|
];
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs tools/test-modemmanager-service.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
# In Nixpkgs g-ir-scanner is patched to produce absolute paths, and
|
|
|
|
# that interferes with ModemManager's tests, causing them to try to
|
|
|
|
# load libraries from the install path, which doesn't usually exist
|
|
|
|
# when `make check' is run. So to work around that, we run it as an
|
|
|
|
# install check instead, when those paths will have been created.
|
|
|
|
doInstallCheck = true;
|
|
|
|
preInstallCheck = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
export G_TEST_DBUS_DAEMON="${dbus.daemon}/bin/dbus-daemon"
|
2021-07-14 22:03:04 +00:00
|
|
|
patchShebangs tools/tests/test-wrapper.sh
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2021-07-14 22:03:04 +00:00
|
|
|
installCheckTarget = "check";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "WWAN modem manager, part of NetworkManager";
|
|
|
|
homepage = "https://www.freedesktop.org/wiki/Software/ModemManager/";
|
|
|
|
license = licenses.gpl2Plus;
|
2021-07-14 22:03:04 +00:00
|
|
|
maintainers = teams.freedesktop.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|