about summary refs log tree commit diff
path: root/pkgs/tools/networking
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/networking')
-rw-r--r--pkgs/tools/networking/flannel/plugin.nix29
-rw-r--r--pkgs/tools/networking/kapp/default.nix4
-rw-r--r--pkgs/tools/networking/linux-router/default.nix81
-rw-r--r--pkgs/tools/networking/networkmanager/libnma/default.nix4
-rw-r--r--pkgs/tools/networking/oha/default.nix30
-rw-r--r--pkgs/tools/networking/stuntman/default.nix45
-rw-r--r--pkgs/tools/networking/v2ray/default.nix14
-rw-r--r--pkgs/tools/networking/wicd/default.nix121
-rw-r--r--pkgs/tools/networking/wicd/dhclient.patch120
-rw-r--r--pkgs/tools/networking/wicd/fix-app-icon.patch19
-rw-r--r--pkgs/tools/networking/wicd/fix-curses.patch15
-rw-r--r--pkgs/tools/networking/wicd/fix-gtk-issues.patch47
-rw-r--r--pkgs/tools/networking/wicd/no-optimization.patch21
-rw-r--r--pkgs/tools/networking/wicd/no-var-install.patch17
-rw-r--r--pkgs/tools/networking/wicd/pygtk.patch15
-rw-r--r--pkgs/tools/networking/wicd/urwid-api-update.patch21
-rw-r--r--pkgs/tools/networking/wicd/wpa2-ttls20
17 files changed, 196 insertions, 427 deletions
diff --git a/pkgs/tools/networking/flannel/plugin.nix b/pkgs/tools/networking/flannel/plugin.nix
new file mode 100644
index 000000000000..657be79b61bf
--- /dev/null
+++ b/pkgs/tools/networking/flannel/plugin.nix
@@ -0,0 +1,29 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule {
+  pname = "cni-plugin-flannel";
+  version = "unstable-2021-09-10";
+
+  src = fetchFromGitHub {
+    owner = "flannel-io";
+    repo = "cni-plugin";
+    rev = "8ce83510da59681da905dccb8364af9472cac341";
+    sha256 = "sha256-x6F8n+IJ1pZdbDwniWWmoGKgQm235ax3mbOcbYqWLCs=";
+  };
+
+  vendorSha256 = "sha256-TLAwE3pTnJYOi1AsOQfsG6t3xLKOah/7DvYjsqyltKs=";
+
+  postInstall = ''
+    mv $out/bin/cni-plugin $out/bin/flannel
+  '';
+
+  doCheck = false;
+
+  meta = with lib; {
+    description = "flannel CNI plugin";
+    homepage = "https://github.com/flannel-io/cni-plugin/";
+    license = licenses.asl20;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ abbe ];
+  };
+}
diff --git a/pkgs/tools/networking/kapp/default.nix b/pkgs/tools/networking/kapp/default.nix
index 181a9d9b85ef..437089cc3967 100644
--- a/pkgs/tools/networking/kapp/default.nix
+++ b/pkgs/tools/networking/kapp/default.nix
@@ -1,13 +1,13 @@
 { lib, buildGoModule, fetchFromGitHub, installShellFiles }:
 buildGoModule rec {
   pname = "kapp";
-  version = "0.37.0";
+  version = "0.38.0";
 
   src = fetchFromGitHub {
     owner = "vmware-tanzu";
     repo = "carvel-kapp";
     rev = "v${version}";
-    sha256 = "sha256-SxS6KBiKc68PcRycdVDWWfXBKOJvo7GuG/0dUQGcHsg=";
+    sha256 = "sha256-sUP+C4ynqeODAKkjUWhL1yqlzXkXydd1ENgHQw4enA4=";
   };
 
   vendorSha256 = null;
diff --git a/pkgs/tools/networking/linux-router/default.nix b/pkgs/tools/networking/linux-router/default.nix
new file mode 100644
index 000000000000..a378a729c7b5
--- /dev/null
+++ b/pkgs/tools/networking/linux-router/default.nix
@@ -0,0 +1,81 @@
+{ stdenv, lib, fetchFromGitHub, makeWrapper
+
+# --- Runtime Dependencies ---
+, bash, procps, iproute2, dnsmasq, iptables
+, coreutils, flock, gawk, getopt, gnugrep, gnused, which
+# `nmcli` is not required for create_ap.
+# Use NetworkManager by default because it is very likely already present
+, useNetworkManager ? true
+, networkmanager
+
+# --- WiFi Hotspot Dependencies ---
+, useWifiDependencies ? true
+, hostapd, iw
+# You only need this if 'iw' can not recognize your adapter.
+, useWirelessTools ? true
+, wirelesstools # for iwconfig
+# To fall back to haveged if entropy is low.
+# Defaulting to false because not having it does not break things.
+# If it is really needed, warnings will be logged to journal.
+, useHaveged ? false
+, haveged
+# You only need this if you wish to show WiFi QR codes in terminal
+, useQrencode ? true
+, qrencode
+}:
+
+stdenv.mkDerivation rec {
+  pname = "linux-router";
+  version = "0.6.2";
+
+  src = fetchFromGitHub {
+    owner = "garywill";
+    repo = "linux-router";
+    rev = "${version}";
+    sha256 = "193bnlwmjxsk0cri6xdylf218qayldn02pdnppvbd39ls361776z";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  dontBuild = true;
+
+  installPhase = with lib; let
+      binPath = makeBinPath ([ procps iproute2 getopt bash dnsmasq
+        iptables coreutils which flock gnugrep gnused gawk ]
+        ++ optional useNetworkManager                          networkmanager
+        ++ optional useWifiDependencies                        hostapd
+        ++ optional useWifiDependencies                        iw
+        ++ optional (useWifiDependencies && useWirelessTools)  wirelesstools
+        ++ optional (useWifiDependencies && useHaveged)        haveged
+        ++ optional (useWifiDependencies && useQrencode)       qrencode);
+    in
+    ''
+      mkdir -p $out/bin/ $out/.bin-wrapped
+      mv lnxrouter $out/.bin-wrapped/lnxrouter
+      makeWrapper $out/.bin-wrapped/lnxrouter $out/bin/lnxrouter --prefix PATH : ${binPath}
+    '';
+
+  meta = with lib; {
+    homepage = "https://github.com/garywill/linux-router";
+    description = "Set Linux as router / Wifi hotspot / proxy in one command";
+    longDescription = ''
+      Features:
+
+      - Create a NATed sub-network
+      - Provide Internet
+      - DHCP server and RA
+      - DNS server
+      - IPv6 (behind NATed LAN, like IPv4)
+      - Creating Wifi hotspot:
+        - Channel selecting
+        - Choose encryptions: WPA2/WPA, WPA2, WPA, No encryption
+        - Create AP on the same interface you are getting Internet (require same channel)
+      - Transparent proxy (redsocks)
+      - DNS proxy
+      - Compatible with NetworkManager (automatically set interface as unmanaged)
+    '';
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ x3ro ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/tools/networking/networkmanager/libnma/default.nix b/pkgs/tools/networking/networkmanager/libnma/default.nix
index 50fc66a8d68b..14a7e11aade1 100644
--- a/pkgs/tools/networking/networkmanager/libnma/default.nix
+++ b/pkgs/tools/networking/networkmanager/libnma/default.nix
@@ -24,13 +24,13 @@
 
 stdenv.mkDerivation rec {
   pname = "libnma";
-  version = "1.8.30";
+  version = "1.8.32";
 
   outputs = [ "out" "dev" "devdoc" ];
 
   src = fetchurl {
     url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    sha256 = "1d5gzn7ss5vi0bhc8s4i5gsrck1ajslajam5jxfqazg094mffcys";
+    sha256 = "Cle5Oi+tQ6zHY/Mg3Tp6k8QpsOMRjfpUnWeCTN3E6QU=";
   };
 
   patches = [
diff --git a/pkgs/tools/networking/oha/default.nix b/pkgs/tools/networking/oha/default.nix
new file mode 100644
index 000000000000..185176440c1b
--- /dev/null
+++ b/pkgs/tools/networking/oha/default.nix
@@ -0,0 +1,30 @@
+{ fetchFromGitHub, lib, pkg-config, rustPlatform, stdenv, openssl, Security }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "oha";
+  version = "0.4.6";
+
+  src = fetchFromGitHub {
+    owner = "hatoo";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0vx8ki0wi9xil2iksvxzh8mhx4c5ikkhdcnc8mcwqn14cvjkggja";
+  };
+
+  cargoSha256 = "1nx2lvbjflsjma5q9ck6vq499hf75w91i4h8wlzr83wqk37i7rhc";
+
+  nativeBuildInputs = lib.optional stdenv.isLinux pkg-config;
+
+  buildInputs = lib.optional stdenv.isLinux openssl
+    ++ lib.optional stdenv.isDarwin Security;
+
+  # tests don't work inside the sandbox
+  doCheck = false;
+
+  meta = with lib; {
+    description = "HTTP load generator inspired by rakyll/hey with tui animation";
+    homepage = "https://github.com/hatoo/oha";
+    license = licenses.mit;
+    maintainers = with maintainers; [ figsoda ];
+  };
+}
diff --git a/pkgs/tools/networking/stuntman/default.nix b/pkgs/tools/networking/stuntman/default.nix
new file mode 100644
index 000000000000..1825a3971a74
--- /dev/null
+++ b/pkgs/tools/networking/stuntman/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, lib, fetchFromGitHub, openssl, boost }:
+
+stdenv.mkDerivation {
+  pname = "stuntman";
+  version = "1.2.16";
+
+  src = fetchFromGitHub {
+    owner = "jselbie";
+    repo = "stunserver";
+    rev = "cfadf9c3836d5ae63a682913de24ba085df924f3";
+    sha256 = "1gcx4zj44f0viddnn5klkmq0dgd29av5p06iyf9f1va4a3lk0cbg";
+  };
+
+  buildInputs = [
+    boost
+    openssl
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin
+    mv stunserver $out/bin/
+    mv stunclient $out/bin/
+
+    runHook postInstall
+  '';
+
+  doCheck = true;
+  checkPhase = ''
+    runHook preCheck
+
+    ./stuntestcode
+
+    runHook postCheck
+  '';
+
+  meta = with lib; {
+    description = "STUNTMAN - an open source STUN server and client";
+    homepage = "http://www.stunprotocol.org/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ mattchrist ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/tools/networking/v2ray/default.nix b/pkgs/tools/networking/v2ray/default.nix
index 33fbd5bc92f5..719e1d9b44f3 100644
--- a/pkgs/tools/networking/v2ray/default.nix
+++ b/pkgs/tools/networking/v2ray/default.nix
@@ -3,22 +3,22 @@
 }:
 
 let
-  version = "4.41.1";
+  version = "4.42.1";
 
   src = fetchFromGitHub {
     owner = "v2fly";
     repo = "v2ray-core";
     rev = "v${version}";
-    sha256 = "14zqvmf7xa4knmc57ck1ns0i0va0223qdp64qmm3q2w82dh9mnb8";
+    sha256 = "19xkbkzv9bgj68kmvrxsdqzx40vlyvzl8nn2n19hwwmkrazqgf04";
   };
 
-  vendorSha256 = "sha256-K8gFF9TbhVgNOySz7nhPFIdSNWNYKUyFD0LIk6acnkc=";
+  vendorSha256 = "sha256-N1DYV0zSzCepkRMbcQUHqjITvmGahYKNn1uhL+csMSc=";
 
   assets = {
     # MIT licensed
     "geoip.dat" = let
-      geoipRev = "202107290023";
-      geoipSha256 = "14xgy0bsamj2k4knfs1r453yp27wq8qmjqifq63zbp4lb9v8xnjy";
+      geoipRev = "202109102251";
+      geoipSha256 = "0qh8yf0m6sna3z5i2plbgw61q08qcfcx0l1z5bmwxijagf1yb7fa";
     in fetchurl {
       url = "https://github.com/v2fly/geoip/releases/download/${geoipRev}/geoip.dat";
       sha256 = geoipSha256;
@@ -26,8 +26,8 @@ let
 
     # MIT licensed
     "geosite.dat" = let
-      geositeRev = "20210727125446";
-      geositeSha256 = "14z1419dkbippm12z6gvwh3q1wd6x1p4sk6zp2i4qa408i1gc81c";
+      geositeRev = "20210910080130";
+      geositeSha256 = "0d6bzrs5mhca59j1w73kqw10jqkwic9ywm3jvszpd077qwh64dwn";
     in fetchurl {
       url = "https://github.com/v2fly/domain-list-community/releases/download/${geositeRev}/dlc.dat";
       sha256 = geositeSha256;
diff --git a/pkgs/tools/networking/wicd/default.nix b/pkgs/tools/networking/wicd/default.nix
deleted file mode 100644
index e4eb0a2cdc8c..000000000000
--- a/pkgs/tools/networking/wicd/default.nix
+++ /dev/null
@@ -1,121 +0,0 @@
-{ lib, stdenv, fetchurl, python2Packages
-, wpa_supplicant, dhcp, dhcpcd, wirelesstools
-, nettools, openresolv, iproute2, iputils }:
-
-let
-  inherit (python2Packages) python pygobject2 dbus-python pyGtkGlade pycairo;
-in stdenv.mkDerivation rec {
-  pname = "wicd";
-  version = "1.7.2.4";
-
-  src = fetchurl {
-    url = "https://launchpad.net/wicd/1.7/${version}/+download/${pname}-${version}.tar.gz";
-    sha256 = "15ywgh60xzmp5z8l1kzics7yi95isrjg1paz42dvp7dlpdfzpzfw";
-  };
-
-  buildInputs = with python2Packages; [
-    python Babel urwid notify
-  ];
-
-  patches = [
-    ./no-var-install.patch
-    ./pygtk.patch
-    ./no-optimization.patch
-    ./dhclient.patch
-    ./fix-app-icon.patch
-    ./fix-gtk-issues.patch
-    ./urwid-api-update.patch
-    ./fix-curses.patch
-    ];
-
-  # Should I be using pygtk's propagated build inputs?
-  # !!! Should use makeWrapper.
-  postPatch = ''
-    # We don't have "python2".
-    substituteInPlace wicd/wicd-daemon.py --replace 'misc.find_path("python2")' "'${python.interpreter}'"
-
-    substituteInPlace in/scripts=wicd.in --subst-var-by TEMPLATE-DEFAULT $out/share/other/dhclient.conf.template.default
-
-    sed -i "2iexport PATH=${lib.makeBinPath [ python wpa_supplicant dhcpcd dhcp wirelesstools nettools nettools iputils openresolv iproute2 ]}\$\{PATH:+:\}\$PATH" in/scripts=wicd.in
-    sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pygobject2}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd.in
-    sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-client.in
-    sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject2}):$(toPythonPath ${pygobject2})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-client.in
-    sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-gtk.in
-    sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject2}):$(toPythonPath ${pygobject2})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python}):$(toPythonPath ${python2Packages.notify})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-gtk.in
-    sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-cli.in
-    sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject2}):$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-cli.in
-    sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-curses.in
-    sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject2}):$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python}):$(toPythonPath ${python2Packages.urwid})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-curses.in
-    rm po/ast.po
-  '';
-
-  configurePhase = ''
-    python setup.py configure \
-    --lib=$out/lib/ \
-    --share=$out/share/ \
-    --etc=/var/lib/wicd/ \
-    --scripts=$out/etc/scripts/ \
-    --pixmaps=$out/share/pixmaps/ \
-    --images=$out/share/pixmaps/wicd/ \
-    --encryption=$out/etc/encryption/templates/ \
-    --bin=$out/bin/ \
-    --sbin=$out/sbin/ \
-    --backends=$out/share/backends/ \
-    --daemon=$out/share/daemon/ \
-    --curses=$out/share/curses/ \
-    --gtk=$out/share/gtk/ \
-    --cli=$out/share/cli/ \
-    --networks=/var/lib/wicd/configurations/ \
-    --resume=$out/etc/acpi/resume.d/ \
-    --suspend=$out/etc/acpi/suspend.d/ \
-    --pmutils=$out/lib/pm-utils/sleep.d/ \
-    --dbus=$out/etc/dbus-1/system.d/ \
-    --dbus-service=$out/etc/dbus-1/system-services/ \
-    --systemd=$out/lib/systemd/ \
-    --logrotate=$out/etc/logrotate.d/ \
-    --desktop=$out/share/applications/ \
-    --icons=$out/share/icons/hicolor/ \
-    --translations=$out/share/locale/ \
-    --autostart=$out/etc/xdg/autostart/ \
-    --varlib=$out/var/lib/ \
-    --docdir=$out/share/doc/ \
-    --mandir=$out/share/man/ \
-    --kdedir=$out/share/autostart/ \
-    --python=${python}/bin/python \
-    --distro=nix \
-    --wicdgroup=users \
-    --no-install-init \
-    --no-install-kde \
-    --no-install-acpi \
-    --no-install-pmutils \
-  '';
-
-  installPhase = ''
-    python setup.py install --prefix=$out --install-lib=$out/${python.sitePackages}
-    mkdir -p $out/share/other
-    cp other/dhclient.conf.template.default $out/share/other/dhclient.conf.template.default
-
-    # Add a template for "WPA2 Enterprise" encryption as used, e.g., by the
-    # Eduroam network.  Taken and adapted from
-    # <http://wicd.net/punbb/viewtopic.php?id=87>.
-    cp -v "${./wpa2-ttls}" "$out/etc/encryption/templates/wpa2-ttls"
-    echo "wpa2-ttls" >> "$out/etc/encryption/templates/active"
-  '';
-
-  meta = with lib; {
-    homepage = "http://wicd.net/";
-    description = "A wiredless and wired network manager";
-    longDescription=''
-      A complete network connection manager
-      Wicd supports wired and wireless networks, and capable of
-      creating and tracking profiles for both.  It has a
-      template-based wireless encryption system, which allows the user
-      to easily add encryption methods used.  It ships with some common
-      encryption types, such as WPA and WEP. Wicd will automatically
-      connect at startup to any preferred network within range.
-    '';
-    maintainers = [ maintainers.roconnor ];
-    license = licenses.gpl2;
-    platforms = platforms.linux;
-  };
-}
diff --git a/pkgs/tools/networking/wicd/dhclient.patch b/pkgs/tools/networking/wicd/dhclient.patch
deleted file mode 100644
index fbda1caacb7a..000000000000
--- a/pkgs/tools/networking/wicd/dhclient.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-diff -ruN wicd-1.7.2.4.orig/wicd/wicd-daemon.py wicd-1.7.2.4/wicd/wicd-daemon.py
---- wicd-1.7.2.4.orig/wicd/wicd-daemon.py	2013-06-22 18:55:02.641242947 +0000
-+++ wicd-1.7.2.4/wicd/wicd-daemon.py	2013-06-22 18:58:33.990244153 +0000
-@@ -69,6 +69,7 @@
- wireless_conf = os.path.join(wpath.etc, "wireless-settings.conf")
- wired_conf = os.path.join(wpath.etc, "wired-settings.conf")
- dhclient_conf = os.path.join(wpath.etc, "dhclient.conf.template")
-+dhclient_conf_default = os.path.join(wpath.share, "other", "dhclient.conf.template.default")
- 
- class WicdDaemon(dbus.service.Object):
-     """ The main wicd daemon class.
-@@ -910,7 +911,7 @@
- 
-         if not os.path.isfile(dhclient_conf):
-             print "dhclient.conf.template not found, copying..."
--            shutil.copy(dhclient_conf + ".default", dhclient_conf)            
-+            shutil.copy(dhclient_conf_default, dhclient_conf)
-         # Hide the files, so the keys aren't exposed.
-         print "chmoding configuration files 0600..."
-         os.chmod(app_conf.get_config(), 0600)diff -ruN wicd-1.7.2.4.orig/wicd/wnettools.py wicd-1.7.2.4/wicd/wnettools.py
---- wicd-1.7.2.4.orig/wicd/wnettools.py	2013-03-30 21:47:19.804907552 +0000
-+++ wicd-1.7.2.4/wicd/wnettools.py	2013-03-31 08:44:37.572792110 +0000
-@@ -37,6 +37,7 @@
- import time
- from string import maketrans, translate
- 
-+import tempfile
- import wpath
- import misc
- from misc import find_path 
-@@ -216,6 +217,7 @@
-         self.flush_tool = None
-         self.link_detect = None       
-         self.dhcp_object = None
-+        self.dhclient_conf_path = None;
-     
-     def SetDebugMode(self, value):
-         """ If True, verbose output is enabled. """
-@@ -277,12 +279,6 @@
-                 cmd = ""
-             return (client, cmd)
- 
--                # probably /var/lib/wicd/dhclient.conf with defaults
--        dhclient_conf_path = os.path.join(
--                    wpath.varlib,
--                    'dhclient.conf'
--                )
--        
-         client_dict = {
-             "dhclient" : 
-                 {'connect' : r"%(cmd)s -cf %(dhclientconf)s %(iface)s",
-@@ -307,41 +303,44 @@
-         }
-         (client_name, cmd) = get_client_name(self.DHCP_CLIENT)
- 
--        # cause dhclient doesn't have a handy dandy argument
--        # for specifing the hostname to be sent
--        if client_name == "dhclient" and flavor:
--            if hostname == None:
--                # <hostname> will use the system hostname
--                # we'll use that if there is hostname passed
--                # that shouldn't happen, though
--                hostname = '<hostname>'
--            print 'attempting to set hostname with dhclient'
--            print 'using dhcpcd or another supported client may work better'
--            dhclient_template = \
--                open(os.path.join(wpath.etc, 'dhclient.conf.template'), 'r')
--
--            output_conf = open(dhclient_conf_path, 'w')
--
--            for line in dhclient_template.readlines():
--                line = line.replace('$_HOSTNAME', hostname)
--                output_conf.write(line)
--
--            output_conf.close()
--            dhclient_template.close()
--            os.chmod(dhclient_conf_path, 0644)
--
-         if not client_name or not cmd:
-             print "WARNING: Failed to find a valid dhcp client!"
-             return ""
-             
-         if flavor == "connect":
-+            # cause dhclient doesn't have a handy dandy argument
-+            # for specifing the hostname to be sent
-+            if client_name == "dhclient" and flavor:
-+                if hostname == None:
-+                    # <hostname> will use the system hostname
-+                    # we'll use that if there is hostname passed
-+                    # that shouldn't happen, though
-+                    hostname = '<hostname>'
-+                print 'attempting to set hostname with dhclient'
-+                print 'using dhcpcd or another supported client may work better'
-+                if not self.dhclient_conf_path:
-+                    _,self.dhclient_conf_path = tempfile.mkstemp()
-+                    print 'New dhclient conf path: %s ' % self.dhclient_conf_path
-+                dhclient_template = \
-+                    open(os.path.join(wpath.etc, 'dhclient.conf.template'), 'r')
-+
-+                output_conf = open(self.dhclient_conf_path, 'w')
-+
-+                for line in dhclient_template.readlines():
-+                    line = line.replace('$_HOSTNAME', hostname)
-+                    output_conf.write(line)
-+
-+                output_conf.close()
-+                dhclient_template.close()
-+                os.chmod(self.dhclient_conf_path, 0644)
-+
-             if not hostname:
-                 hostname = os.uname()[1]
-             return client_dict[client_name]['connect'] % \
-                     { "cmd" : cmd,
-                       "iface" : self.iface,
-                       "hostname" : hostname,
--                      'dhclientconf' : dhclient_conf_path }
-+                      'dhclientconf' : self.dhclient_conf_path }
-         elif flavor == "release":
-             return client_dict[client_name]['release'] % {"cmd":cmd, "iface":self.iface}
-         else:
diff --git a/pkgs/tools/networking/wicd/fix-app-icon.patch b/pkgs/tools/networking/wicd/fix-app-icon.patch
deleted file mode 100644
index 31b47bb45881..000000000000
--- a/pkgs/tools/networking/wicd/fix-app-icon.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Someone forgot to pack wicd.png icon. We will replace it with existing one.
-
-diff -ruN wicd-1.7.2.4.orig/gtk/gui.py wicd-1.7.2.4/gtk/gui.py
---- wicd-1.7.2.4.orig/gtk/gui.py	2013-03-30 21:47:19.802907553 +0000
-+++ wicd-1.7.2.4/gtk/gui.py	2013-03-31 08:13:32.876871673 +0000
-@@ -205,8 +205,10 @@
- 
-         self.status_area.hide_all()
- 
--        if os.path.exists(os.path.join(wpath.images, "wicd.png")):
--            self.window.set_icon_from_file(os.path.join(wpath.images, "wicd.png"))
-+        if os.path.exists(os.path.join(wpath.images, "../../icons/hicolour/128x128/apps/wicd-gtk.png")):
-+            self.window.set_icon_from_file(os.path.join(wpath.images, "../../icons/hicolor/128x128/apps/wicd-gtk.png"))
-+        else:
-+            print 'icon doesn\'t exist %s' % os.path.join(wpath.images, "../../icons/hicolor/128x128/apps/wicd-gtk.png")
-         self.statusID = None
-         self.first_dialog_load = True
-         self.is_visible = True
-
diff --git a/pkgs/tools/networking/wicd/fix-curses.patch b/pkgs/tools/networking/wicd/fix-curses.patch
deleted file mode 100644
index 138dfbabfd5c..000000000000
--- a/pkgs/tools/networking/wicd/fix-curses.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/curses/wicd-curses.py	2015-01-27 22:35:25.414781192 -0300
-+++ b/curses/wicd-curses.py	2015-01-28 01:13:48.078904587 -0300
-@@ -1153,9 +1153,10 @@
-         if not ui._started:
-             return False
- 
--        input_data = ui.get_input_nonblocking()
-+        ui.set_input_timeouts(max_wait=0)
-+        input_data = ui.get_input()
-         # Resolve any "alarms" in the waiting
--        self.handle_keys(input_data[1])
-+        self.handle_keys(input_data)
- 
-         # Update the screen
-         canvas = self.frame.render((self.size), True)
diff --git a/pkgs/tools/networking/wicd/fix-gtk-issues.patch b/pkgs/tools/networking/wicd/fix-gtk-issues.patch
deleted file mode 100644
index 31e553b46b50..000000000000
--- a/pkgs/tools/networking/wicd/fix-gtk-issues.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-diff -ruN wicd-1.7.2.4.orig/gtk/gui.py wicd-1.7.2.4/gtk/gui.py
---- wicd-1.7.2.4.orig/gtk/gui.py	2013-03-31 17:01:29.367001288 +0000
-+++ wicd-1.7.2.4/gtk/gui.py	2013-03-31 17:55:20.826028396 +0000
-@@ -35,7 +35,7 @@
- from wicd import misc
- from wicd import wpath
- from wicd import dbusmanager
--from wicd.misc import noneToString
-+from wicd.misc import noneToString, _status_dict
- from wicd.translations import _, language
- import prefs
- from prefs import PreferencesDialog
-@@ -250,7 +250,7 @@
-         
-     def handle_connection_results(self, results):
-         if results not in ['success', 'aborted'] and self.is_visible:
--            error(self.window, language[results], block=False)
-+            error(self.window, misc._status_dict[results], block=False)
- 
-     def create_adhoc_network(self, widget=None):
-         """ Shows a dialog that creates a new adhoc network. """
-diff -ruN wicd-1.7.2.4.orig/po/ru.po wicd-1.7.2.4/po/ru.po
---- wicd-1.7.2.4.orig/po/ru.po	2013-03-31 17:01:29.362001288 +0000
-+++ wicd-1.7.2.4/po/ru.po	2013-03-31 17:43:37.909022515 +0000
-@@ -173,7 +173,7 @@
- 
- #: wicd/misc.py:79
- msgid "Connection Failed: Bad password"
--msgstr "Ошибка соединения: Неверный пароль:"
-+msgstr "Ошибка соединения: Неверный пароль"
- 
- #: wicd/misc.py:89
- msgid "Connection Failed: No DHCP offers received."
-diff -ruN wicd-1.7.2.4.orig/wicd/misc.py wicd-1.7.2.4/wicd/misc.py
---- wicd-1.7.2.4.orig/wicd/misc.py	2013-03-31 17:01:29.369001288 +0000
-+++ wicd-1.7.2.4/wicd/misc.py	2013-03-31 17:23:56.822012593 +0000
-@@ -430,7 +430,9 @@
-     """ Sanitize property names to be used in config-files. """
-     allowed = string.ascii_letters + '_' + string.digits
-     table = string.maketrans(allowed, ' ' * len(allowed))
--    return s.translate(None, table)
-+    #return s.translate(None, table)
-+    #return s.translate(table)
-+    return s
- 
- def sanitize_escaped(s):
-     """ Sanitize double-escaped unicode strings. """
diff --git a/pkgs/tools/networking/wicd/no-optimization.patch b/pkgs/tools/networking/wicd/no-optimization.patch
deleted file mode 100644
index 785cae7b6ed5..000000000000
--- a/pkgs/tools/networking/wicd/no-optimization.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-With optimizations on, python will overwrite the nix store.
-
---- wicd-1.7.0/in/scripts=wicd.in  2011-04-05 14:31:09.733096865 -0400
-+++ wicd-1.7.0/in/scripts=wicd.in  2011-04-05 14:31:16.397096864 -0400
-@@ -1,3 +1,3 @@
- #!/bin/bash
- 
--exec %PYTHON% -O %SHARE%daemon/wicd-daemon.py $@
-+exec %PYTHON% -B %SHARE%daemon/wicd-daemon.py $@
-
---- wicd-1.7.2.4/wicd/wicd-daemon.py  2012-04-30 21:19:45.000000000 +0200
-+++ wicd-1.7.2.4/wicd/wicd-daemon.pynew       2013-03-14 21:35:23.250306592 +0100
-@@ -1812,7 +1812,7 @@
-     daemon = WicdDaemon(wicd_bus, auto_connect=auto_connect)
-     child_pid = None
-     if not no_poll:
--        child_pid = Popen([wpath.python, "-O", 
-+        child_pid = Popen([wpath.python, "-B", 
-                           os.path.join(wpath.daemon, "monitor.py")],
-                           shell=False, close_fds=True).pid
-     atexit.register(on_exit, child_pid)
diff --git a/pkgs/tools/networking/wicd/no-var-install.patch b/pkgs/tools/networking/wicd/no-var-install.patch
deleted file mode 100644
index b01f0e5a438a..000000000000
--- a/pkgs/tools/networking/wicd/no-var-install.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-The install tries to create files in /var.  This patch removes those steps.
-
---- wicd-1.7.2.4/setup.py     2013-03-14 21:28:21.360580941 +0100
-+++ wicd-1.7.2.4/setup.py  2013-03-14 21:22:50.125721943 +0100
-@@ -505,11 +505,8 @@
-         (wpath.dbus_service, ['other/org.wicd.daemon.service']),
-         (wpath.systemd, ['other/wicd.service']),
-         (wpath.logrotate, ['other/wicd.logrotate']),
--        (wpath.log, [empty_file]), 
--        (wpath.etc, ['other/dhclient.conf.template.default']),
-         (wpath.encryption, [('encryption/templates/' + b) for b in 
-                             os.listdir('encryption/templates') if not b.startswith('.')]),
--        (wpath.networks, [empty_file]),
-         (wpath.sbin,  ['scripts/wicd']),  
-         (wpath.daemon, ['wicd/monitor.py', 'wicd/wicd-daemon.py',
-                     'wicd/suspend.py', 'wicd/autoconnect.py']), 
-
diff --git a/pkgs/tools/networking/wicd/pygtk.patch b/pkgs/tools/networking/wicd/pygtk.patch
deleted file mode 100644
index f015e50d684a..000000000000
--- a/pkgs/tools/networking/wicd/pygtk.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-For some reason nix's pygtk doesn't have a pygtk module so we remove the version check.
-If this ever changes we could remove this patch.
-
---- wicd-1.7.0/gtk/wicd-client.py	2009-09-01 11:05:31.000000000 -0400
-+++ wicd-1.7.0/gtk/wicd-client.py	2009-12-28 00:22:57.000000000 -0500
-@@ -43,9 +43,6 @@
- import atexit
- from dbus import DBusException
- 
--import pygtk
--pygtk.require('2.0')
--
- HAS_NOTIFY = True
- try:
-     import pynotify
diff --git a/pkgs/tools/networking/wicd/urwid-api-update.patch b/pkgs/tools/networking/wicd/urwid-api-update.patch
deleted file mode 100644
index a794f6caaeee..000000000000
--- a/pkgs/tools/networking/wicd/urwid-api-update.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/curses/curses_misc.py
-+++ a/curses/curses_misc.py
-@@ -358,6 +358,19 @@ class ComboBox(urwid.WidgetWrap):
-         self.parent = None
-         self.ui = None
-         self.row = None
-+
-+    @property
-+    def focus(self):
-+        return self._focus
-+
-+    @focus.setter
-+    def focus(self, index):
-+        self._focus = index
-+
-+    @focus.deleter
-+    def focus(self):
-+        del self._focus
-+
-     def set_list(self,list):
-         self.list = list
diff --git a/pkgs/tools/networking/wicd/wpa2-ttls b/pkgs/tools/networking/wicd/wpa2-ttls
deleted file mode 100644
index 650375cbbaae..000000000000
--- a/pkgs/tools/networking/wicd/wpa2-ttls
+++ /dev/null
@@ -1,20 +0,0 @@
-name = WPA2-TTLS
-author = various contributors
-version = 1
-require identity *Identity anonymous_identity *Anonymous_identity password *Password ca_cert *Path_to_CA_Cert
-protected password *Password
------
-ctrl_interface=/run/wpa_supplicant
-network={
-        ssid="$_ESSID"
-        scan_ssid=$_SCAN
-        proto=WPA2
-        key_mgmt=WPA-EAP
-        group=CCMP TKIP
-        eap=TTLS
-        identity="$_IDENTITY"
-        password="$_PASSWORD"
-        anonymous_identity="$_ANONYMOUS_IDENTITY"
-        ca_cert="$_CA_CERT"
-        phase2="auth=PAP"
-}