Skip to content

Commit

Permalink
network-manager: 1.4.4 -> 1.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Apr 4, 2017
1 parent 43c0530 commit 6bb303c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 15 deletions.
8 changes: 3 additions & 5 deletions pkgs/tools/networking/network-manager/PppdPath.patch
@@ -1,8 +1,6 @@
diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c
index 89a7add..ae99eb4 100644
--- a/src/ppp-manager/nm-ppp-manager.c
+++ b/src/ppp-manager/nm-ppp-manager.c
@@ -843,7 +843,7 @@ create_pppd_cmd_line (NMPPPManager *self,
--- NetworkManager-1.6.2.org/src/ppp/nm-ppp-manager.c 2017-02-15 13:10:27.000000000 +0100
+++ NetworkManager-1.6.2/./src/ppp/nm-ppp-manager.c 2017-04-03 11:45:39.891653216 +0200
@@ -724,7 +724,7 @@

g_return_val_if_fail (setting != NULL, NULL);

Expand Down
36 changes: 26 additions & 10 deletions pkgs/tools/networking/network-manager/default.nix
Expand Up @@ -2,25 +2,34 @@
, systemd, libgudev, libnl, libuuid, polkit, gnutls, ppp, dhcp, iptables
, libgcrypt, dnsmasq, bluez5, readline
, gobjectIntrospection, modemmanager, openresolv, libndp, newt, libsoup
, ethtool, gnused, coreutils, file, inetutils, kmod }:
, ethtool, iputils, gnused, coreutils, file, inetutils, kmod, jansson, libxslt
, python3Packages, docbook_xsl, fetchpatch }:

stdenv.mkDerivation rec {
name = "network-manager-${version}";
pname = "NetworkManager";
major = "1.4";
version = "${major}.4";
major = "1.6";
version = "${major}.2";

src = fetchurl {
url = "mirror://gnome/sources/${pname}/${major}/${pname}-${version}.tar.xz";
sha256 = "029k2f1arx1m5hppmr778i9yg34jj68nmji3i89qs06c33rpi4w2";
sha256 = "1y96k82rav8if334jl500zc024d210c4pgprh94yqyz3rmanyaxj";
};

outputs = [ "out" "dev" ];

postPatch = ''
patchShebangs ./tools
'';

preConfigure = ''
substituteInPlace configure --replace /usr/bin/uname ${coreutils}/bin/uname
substituteInPlace configure --replace /usr/bin/file ${file}/bin/file
substituteInPlace src/devices/nm-device.c --replace /usr/bin/ping ${inetutils}/bin/ping
substituteInPlace src/devices/nm-device.c \
--replace /usr/bin/ping ${inetutils}/bin/ping \
--replace /usr/bin/ping6 ${inetutils}/bin/ping
substituteInPlace src/devices/nm-arping-manager.c \
--replace '("arping", NULL, NULL);' '("arping", "${inetutils}/bin/arping", NULL);'
substituteInPlace src/NetworkManagerUtils.c --replace /sbin/modprobe ${kmod}/bin/modprobe
substituteInPlace data/84-nm-drivers.rules \
--replace /bin/sh ${stdenv.shell}
Expand Down Expand Up @@ -58,14 +67,21 @@ stdenv.mkDerivation rec {
"--with-libsoup=yes"
];

patches = [ ./PppdPath.patch ];
patches = [
./PppdPath.patch
(fetchpatch {
sha256 = "1n90j5rwg97xkrhlldyr92filc2dmycl9pr0svky9hlcn9csk2z6";
name = "null-dereference.patch";
url = "https://github.com/NetworkManager/NetworkManager/commit/4e8eddd100bbc8429806a70620c90b72cfd29cb1.patch";
})
];

buildInputs = [ systemd libgudev libnl libuuid polkit ppp libndp
bluez5 dnsmasq gobjectIntrospection modemmanager readline newt libsoup ];
bluez5 dnsmasq gobjectIntrospection modemmanager readline newt libsoup jansson ];

propagatedBuildInputs = [ dbus_glib gnutls libgcrypt ];
propagatedBuildInputs = [ dbus_glib gnutls libgcrypt python3Packages.pygobject3 ];

nativeBuildInputs = [ intltool pkgconfig ];
nativeBuildInputs = [ intltool pkgconfig libxslt docbook_xsl ];

preInstall = ''
installFlagsArray=( "sysconfdir=$out/etc" "localstatedir=$out/var" "runstatedir=$out/var/run" )
Expand All @@ -78,7 +94,7 @@ stdenv.mkDerivation rec {
substituteInPlace $out/etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf --replace 'at_console="true"' 'group="networkmanager"'
# rename to network-manager to be in style
mv $out/etc/systemd/system/NetworkManager.service $out/etc/systemd/system/network-manager.service
mv $out/etc/systemd/system/NetworkManager.service $out/etc/systemd/system/network-manager.service
# systemd in NixOS doesn't use `systemctl enable`, so we need to establish
# aliases ourselves.
Expand Down

0 comments on commit 6bb303c

Please sign in to comment.