@@ -1,19 +1,19 @@
1−{ stdenv, fetchurl, intltool, pkgconfig, dbus-glib, gnome3
2−, systemd, libgudev, libnl, libuuid, polkit, gnutls, ppp, dhcp, iptables
1+{ stdenv, fetchurl, substituteAll, intltool, pkgconfig, dbus-glib, gnome3
2+, systemd, libuuid, polkit, gnutls, ppp, dhcp, iptables
33, libgcrypt, dnsmasq, bluez5, readline
44, gobjectIntrospection, modemmanager, openresolv, libndp, newt, libsoup
55, ethtool, iputils, gnused, coreutils, file, inetutils, kmod, jansson, libxslt
6−, python3Packages, docbook_xsl, fetchpatch, openconnect, curl, autoreconfHook }:
6+, python3Packages, docbook_xsl, openconnect, curl, autoreconfHook }:
77
88let
9− pname = "NetworkManager";
10− version = "1.10.6";
9+ pname = "NetworkManager";
1110in stdenv.mkDerivation rec {
12− name = "network-manager-${version}";
11+ name = "network-manager-${version}";
12+ version = "1.12.0";
1313
1414 src = fetchurl {
15− url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
16− sha256 = "0xmc3x41dbcaxjm85wfv405xq1a1n3xw8m8zg645ywm3avlb3w3a";
15+ url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
16+ sha256 = "15bzjkrfa7sw5p5hkdha4a67y1zfnzh1s6za11sh8s1yxmyvkziq";
1717 };
1818
1919 outputs = [ "out" "dev" ];
@@ -25,11 +25,6 @@ in stdenv.mkDerivation rec {
2525 preConfigure = ''
2626 substituteInPlace configure --replace /usr/bin/uname ${coreutils}/bin/uname
2727 substituteInPlace configure --replace /usr/bin/file ${file}/bin/file
28− substituteInPlace src/devices/nm-device.c \
29− --replace /usr/bin/ping ${inetutils}/bin/ping \
30− --replace /usr/bin/ping6 ${inetutils}/bin/ping
31− substituteInPlace src/devices/nm-arping-manager.c \
32− --replace '("arping", NULL, NULL);' '("arping", "${iputils}/bin/arping", NULL);'
3328 substituteInPlace data/84-nm-drivers.rules \
3429 --replace /bin/sh ${stdenv.shell}
3530 substituteInPlace data/85-nm-unmanaged.rules \
@@ -38,10 +33,6 @@ in stdenv.mkDerivation rec {
3833 --replace /bin/sed ${gnused}/bin/sed
3934 substituteInPlace data/NetworkManager.service.in \
4035 --replace /bin/kill ${coreutils}/bin/kill
41− substituteInPlace clients/common/nm-vpn-helpers.c \
42− --subst-var-by openconnect ${openconnect}
43− substituteInPlace src/nm-core-utils.c \
44− --subst-var-by modprobeBinPath ${kmod}/bin/modprobe
4536 # to enable link-local connections
4637 configureFlags="$configureFlags --with-udev-dir=$out/lib/udev"
4738
@@ -70,16 +61,32 @@ in stdenv.mkDerivation rec {
7061 "--with-modem-manager-1"
7162 "--with-nmtui"
7263 "--disable-gtk-doc"
64+ "--with-libnm-glib" # legacy library, TODO: remove
65+ "--disable-tests"
7366 ];
7467
7568 patches = [
76− ./PppdPath.patch
77− ./openconnect_helper_path.patch
78− ./modprobe.patch
69+ # https://bugzilla.gnome.org/show_bug.cgi?id=796752
70+ (fetchurl {
71+ url = https://bugzilla.gnome.org/attachment.cgi?id=372955;
72+ sha256 = "17rl19lprnsz4wjmp54c1qw6a3pf8x97bhd69xavwy7cx6z84b3n";
73+ })
74+ # https://bugzilla.gnome.org/show_bug.cgi?id=796751
75+ (fetchurl {
76+ url = https://bugzilla.gnome.org/attachment.cgi?id=372953;
77+ sha256 = "1crjplyiiipkhjjlifrv6hhvxinlcxd6irp9ijbc7jij31g44i0a";
78+ })
79+ (substituteAll {
80+ src = ./fix-paths.patch;
81+ inherit inetutils kmod openconnect;
82+ })
83+
7984 ];
8085
81− buildInputs = [ systemd libgudev libnl libuuid polkit ppp libndp curl
82− bluez5 dnsmasq gobjectIntrospection modemmanager readline newt libsoup jansson ];
86+ buildInputs = [
87+ systemd libuuid polkit ppp libndp curl
88+ bluez5 dnsmasq gobjectIntrospection modemmanager readline newt libsoup jansson
89+ ];
8390
8491 propagatedBuildInputs = [ dbus-glib gnutls libgcrypt python3Packages.pygobject3 ];
8592
@@ -114,10 +121,10 @@ in stdenv.mkDerivation rec {
114121 };
115122
116123 meta = with stdenv.lib; {
117− homepage = https://wiki.gnome.org/Projects/NetworkManager;
124+ homepage = https://wiki.gnome.org/Projects/NetworkManager;
118125 description = "Network configuration and management tool";
119− license = licenses.gpl2Plus;
126+ license = licenses.gpl2Plus;
120127 maintainers = with maintainers; [ phreedom rickynils domenkozar obadz ];
121− platforms = platforms.linux;
128+ platforms = platforms.linux;
122129 };
123130}