1 { lib, stdenv, fetchurl
2 , glib, udev, libgudev, polkit, ppp, gettext, pkg-config, python3
3 , libmbim, libqmi, systemd, vala, gobject-introspection, dbus
6 stdenv.mkDerivation rec {
7 pname = "modemmanager";
11 url = "https://www.freedesktop.org/software/ModemManager/ModemManager-${version}.tar.xz";
12 sha256 = "sha256-tGTkkl2VWmyobdCGFudjsmrkbX/Tfb4oFnjjQGWx5DA=";
15 nativeBuildInputs = [ vala gobject-introspection gettext pkg-config ];
17 buildInputs = [ glib udev libgudev polkit ppp libmbim libqmi systemd ];
19 nativeInstallCheckInputs = [
20 python3 python3.pkgs.dbus-python python3.pkgs.pygobject3
25 "--with-udev-base-dir=${placeholder "out"}/lib/udev"
26 "--with-dbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d"
27 "--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
29 "--localstatedir=/var"
30 "--with-systemd-suspend-resume"
31 "--with-systemd-journal"
35 patchShebangs tools/test-modemmanager-service.py
38 # In Nixpkgs g-ir-scanner is patched to produce absolute paths, and
39 # that interferes with ModemManager's tests, causing them to try to
40 # load libraries from the install path, which doesn't usually exist
41 # when `make check' is run. So to work around that, we run it as an
42 # install check instead, when those paths will have been created.
43 doInstallCheck = true;
45 export G_TEST_DBUS_DAEMON="${dbus}/bin/dbus-daemon"
46 patchShebangs tools/tests/test-wrapper.sh
48 installCheckTarget = "check";
50 enableParallelBuilding = true;
53 description = "WWAN modem manager, part of NetworkManager";
54 homepage = "https://www.freedesktop.org/wiki/Software/ModemManager/";
55 license = licenses.gpl2Plus;
56 maintainers = teams.freedesktop.members;
57 platforms = platforms.linux;