]> Git — Sourcephile - julm/julm-nix.git/blob - nixpkgs/pkgs/modemmanager-1-18.nix
nix: format with nixfmt-rfc-style
[julm/julm-nix.git] / nixpkgs / pkgs / modemmanager-1-18.nix
1 {
2 lib,
3 stdenv,
4 fetchurl,
5 glib,
6 udev,
7 libgudev,
8 polkit,
9 ppp,
10 gettext,
11 pkg-config,
12 python3,
13 libmbim,
14 libqmi,
15 systemd,
16 vala,
17 gobject-introspection,
18 dbus,
19 }:
20
21 stdenv.mkDerivation rec {
22 pname = "modemmanager";
23 version = "1.18.12";
24
25 src = fetchurl {
26 url = "https://www.freedesktop.org/software/ModemManager/ModemManager-${version}.tar.xz";
27 sha256 = "sha256-tGTkkl2VWmyobdCGFudjsmrkbX/Tfb4oFnjjQGWx5DA=";
28 };
29
30 nativeBuildInputs = [
31 vala
32 gobject-introspection
33 gettext
34 pkg-config
35 ];
36
37 buildInputs = [
38 glib
39 udev
40 libgudev
41 polkit
42 ppp
43 libmbim
44 libqmi
45 systemd
46 ];
47
48 nativeInstallCheckInputs = [
49 python3
50 python3.pkgs.dbus-python
51 python3.pkgs.pygobject3
52 ];
53
54 configureFlags = [
55 "--with-polkit"
56 "--with-udev-base-dir=${placeholder "out"}/lib/udev"
57 "--with-dbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d"
58 "--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
59 "--sysconfdir=/etc"
60 "--localstatedir=/var"
61 "--with-systemd-suspend-resume"
62 "--with-systemd-journal"
63 ];
64
65 postPatch = ''
66 patchShebangs tools/test-modemmanager-service.py
67 '';
68
69 # In Nixpkgs g-ir-scanner is patched to produce absolute paths, and
70 # that interferes with ModemManager's tests, causing them to try to
71 # load libraries from the install path, which doesn't usually exist
72 # when `make check' is run. So to work around that, we run it as an
73 # install check instead, when those paths will have been created.
74 doInstallCheck = false;
75 doCheck = false;
76 preInstallCheck = ''
77 export G_TEST_DBUS_DAEMON="${dbus}/bin/dbus-daemon"
78 patchShebangs tools/tests/test-wrapper.sh
79 '';
80 installCheckTarget = "check";
81
82 enableParallelBuilding = true;
83
84 meta = with lib; {
85 description = "WWAN modem manager, part of NetworkManager";
86 homepage = "https://www.freedesktop.org/wiki/Software/ModemManager/";
87 license = licenses.gpl2Plus;
88 maintainers = teams.freedesktop.members;
89 platforms = platforms.linux;
90 };
91 }