3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/networkmanager/0.9.8/default.nix

65 lines
2 KiB
Nix
Raw Normal View History

2021-01-17 03:51:22 +00:00
{ lib, stdenv, fetchurl, intltool, pkg-config, dbus-glib
2015-06-12 00:00:35 +01:00
, udev, libnl, libuuid, gnutls, dhcp
2016-08-15 08:32:51 +01:00
, libgcrypt, perl, libgudev, avahi, ppp, kmod }:
2015-06-12 00:00:35 +01:00
stdenv.mkDerivation rec {
2021-03-08 15:28:44 +00:00
pname = "networkmanager";
2015-06-12 00:00:35 +01:00
version = "0.9.8.10";
src = fetchurl {
url = "mirror://gnome/sources/NetworkManager/0.9/NetworkManager-${version}.tar.xz";
sha256 = "0wn9qh8r56r8l19dqr68pdl1rv3zg1dv47rfy6fqa91q7li2fk86";
};
preConfigure = ''
substituteInPlace tools/glib-mkenums --replace /usr/bin/perl ${perl}/bin/perl
2016-08-15 08:32:51 +01:00
substituteInPlace src/nm-device.c \
--replace @avahi@ ${avahi} \
--replace @kmod@ ${kmod}
substituteInPlace src/ppp-manager/nm-ppp-manager.c \
--replace @ppp@ ${ppp} \
--replace @kmod@ ${kmod}
2015-06-12 00:00:35 +01:00
'';
# Right now we hardcode quite a few paths at build time. Probably we should
# patch networkmanager to allow passing these path in config file. This will
# remove unneeded build-time dependencies.
configureFlags = [
"--with-distro=exherbo"
"--with-dhclient=${dhcp}/sbin/dhclient"
"--with-dhcpcd=no"
"--with-iptables=no"
"--with-udev-dir=\${out}/lib/udev"
"--with-resolvconf=no"
"--sysconfdir=/etc" "--localstatedir=/var"
"--with-dbus-sys-dir=\${out}/etc/dbus-1/system.d"
"--with-crypto=gnutls" "--disable-more-warnings"
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
"--with-kernel-firmware-dir=/run/current-system/firmware"
"--disable-ppp"
];
2015-11-13 22:23:14 +00:00
buildInputs = [ udev libnl libuuid gnutls libgcrypt libgudev ];
2015-06-12 00:00:35 +01:00
propagatedBuildInputs = [ dbus-glib ];
2015-06-12 00:00:35 +01:00
2021-01-17 03:51:22 +00:00
nativeBuildInputs = [ intltool pkg-config ];
2015-06-12 00:00:35 +01:00
patches =
[ ./libnl-3.2.25.patch
./nixos-purity.patch
];
preInstall =
''
installFlagsArray=( "sysconfdir=$out/etc" "localstatedir=$out/var" )
'';
meta = with lib; {
homepage = "http://projects.gnome.org/NetworkManager/";
2015-06-12 00:00:35 +01:00
description = "Network configuration and management tool";
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}