1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 22:20:51 +00:00
nixpkgs/pkgs/tools/networking/modemmanager/default.nix

55 lines
1.6 KiB
Nix
Raw Normal View History

2018-03-13 21:37:13 +00:00
{ stdenv, fetchurl, udev, libgudev, polkit, dbus-glib, ppp, gettext, pkgconfig
2018-03-23 08:17:14 +00:00
, libmbim, libqmi, systemd, glib }:
stdenv.mkDerivation rec {
name = "ModemManager-${version}";
2018-03-13 21:37:13 +00:00
version = "1.7.990";
2014-02-08 19:16:34 +00:00
src = fetchurl {
url = "http://www.freedesktop.org/software/ModemManager/${name}.tar.xz";
2018-03-13 21:37:13 +00:00
sha256 = "1v4hixmghlrw7w4ajq2x4k62js0594h223d0yma365zwqr7hjrfl";
};
2018-03-13 21:37:13 +00:00
nativeBuildInputs = [ gettext pkgconfig ];
2018-03-23 08:17:14 +00:00
buildInputs = [ udev libgudev polkit dbus-glib ppp libmbim libqmi systemd glib ];
2014-02-08 19:16:34 +00:00
configureFlags = [
"--with-polkit"
"--with-udev-base-dir=$(out)/lib/udev"
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
2015-03-26 20:12:50 +00:00
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-suspend-resume=systemd"
2014-02-08 19:16:34 +00:00
];
2015-03-26 20:12:50 +00:00
installFlags = [ "DESTDIR=\${out}" ];
preInstall = ''
mkdir -p $out/etc/systemd/system
'';
postInstall = ''
2015-03-26 20:12:50 +00:00
mv $out/$out/etc/systemd/system/ModemManager.service $out/etc/systemd/system
rm -rf $out/$out/etc
mv $out/$out/* $out
DIR=$out/$out
while rmdir $DIR 2>/dev/null; do
DIR="$(dirname "$DIR")"
done
# systemd in NixOS doesn't use `systemctl enable`, so we need to establish
# aliases ourselves.
ln -s $out/etc/systemd/system/ModemManager.service \
$out/etc/systemd/system/dbus-org.freedesktop.ModemManager1.service
'';
2018-03-13 21:37:13 +00:00
meta = with stdenv.lib; {
description = "WWAN modem manager, part of NetworkManager";
2018-03-13 21:37:13 +00:00
homepage = https://www.freedesktop.org/wiki/Software/ModemManager/;
license = licenses.gpl2Plus;
maintainers = [ ];
2018-03-13 21:37:13 +00:00
platforms = platforms.linux;
};
}