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