]> Git — Sourcephile - julm/julm-nix.git/blob - nixpkgs/pkgs/modemmanager-1-18.nix
heartwood: add as input
[julm/julm-nix.git] / nixpkgs / pkgs / modemmanager-1-18.nix
1 { lib, stdenv, fetchurl
2 , glib, udev, libgudev, polkit, ppp, gettext, pkg-config, python3
3 , libmbim, libqmi, systemd, vala, gobject-introspection, dbus
4 }:
5
6 stdenv.mkDerivation rec {
7 pname = "modemmanager";
8 version = "1.18.12";
9
10 src = fetchurl {
11 url = "https://www.freedesktop.org/software/ModemManager/ModemManager-${version}.tar.xz";
12 sha256 = "sha256-tGTkkl2VWmyobdCGFudjsmrkbX/Tfb4oFnjjQGWx5DA=";
13 };
14
15 nativeBuildInputs = [ vala gobject-introspection gettext pkg-config ];
16
17 buildInputs = [ glib udev libgudev polkit ppp libmbim libqmi systemd ];
18
19 nativeInstallCheckInputs = [
20 python3 python3.pkgs.dbus-python python3.pkgs.pygobject3
21 ];
22
23 configureFlags = [
24 "--with-polkit"
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"
28 "--sysconfdir=/etc"
29 "--localstatedir=/var"
30 "--with-systemd-suspend-resume"
31 "--with-systemd-journal"
32 ];
33
34 postPatch = ''
35 patchShebangs tools/test-modemmanager-service.py
36 '';
37
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;
44 preInstallCheck = ''
45 export G_TEST_DBUS_DAEMON="${dbus}/bin/dbus-daemon"
46 patchShebangs tools/tests/test-wrapper.sh
47 '';
48 installCheckTarget = "check";
49
50 enableParallelBuilding = true;
51
52 meta = with lib; {
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;
58 };
59 }