modemmanager: 1.2.0 -> 1.4.6

This commit is contained in:
William A. Kennington III 2015-03-26 13:12:50 -07:00
parent c99fa3a261
commit bb4bb9fc43

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "ModemManager-${version}"; name = "ModemManager-${version}";
version = "1.2.0"; version = "1.4.6";
src = fetchurl { src = fetchurl {
url = "http://www.freedesktop.org/software/ModemManager/${name}.tar.xz"; url = "http://www.freedesktop.org/software/ModemManager/${name}.tar.xz";
sha256 = "1g08ciyhys9bi5m45z30kln17zni4r07i5byjaglmwq6np1xincb"; sha256 = "1kd5nn5rm88c8rgmzwy2fsf3cr7fai7r85mi61kcby0hcgsapv8c";
}; };
nativeBuildInputs = [ intltool pkgconfig ]; nativeBuildInputs = [ intltool pkgconfig ];
@ -17,9 +17,25 @@ stdenv.mkDerivation rec {
"--with-polkit" "--with-polkit"
"--with-udev-base-dir=$(out)/lib/udev" "--with-udev-base-dir=$(out)/lib/udev"
"--with-systemdsystemunitdir=$(out)/etc/systemd/system" "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
"--sysconfdir=/etc"
"--localstatedir=/var"
]; ];
installFlags = [ "DESTDIR=\${out}" ];
preInstall = ''
mkdir -p $out/etc/systemd/system
'';
postInstall = '' postInstall = ''
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 # systemd in NixOS doesn't use `systemctl enable`, so we need to establish
# aliases ourselves. # aliases ourselves.
ln -s $out/etc/systemd/system/ModemManager.service \ ln -s $out/etc/systemd/system/ModemManager.service \