summary refs log tree commit diff
path: root/pkgs/tools/networking/wicd/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/networking/wicd/default.nix')
-rw-r--r--pkgs/tools/networking/wicd/default.nix21
1 files changed, 16 insertions, 5 deletions
diff --git a/pkgs/tools/networking/wicd/default.nix b/pkgs/tools/networking/wicd/default.nix
index 70cc4a3b46cf..19f30713a9fe 100644
--- a/pkgs/tools/networking/wicd/default.nix
+++ b/pkgs/tools/networking/wicd/default.nix
@@ -6,20 +6,25 @@
 # on urwid which has not been packaged at this time (2009-12-27).
 
 stdenv.mkDerivation rec {
-  name = "wicd-1.7.0";
+  name = "wicd-1.7.1-beta2";
   
   src = fetchurl {
-    url = "mirror://sourceforge/project/wicd/wicd-stable/${name}/${name}.tar.bz2";
-    sha256 = "0civfmpjlsvnaiw7fkpq34mh5ndhfzb9mkl3q2d3rjd4z0mnki8l";
+    url = "mirror://sourceforge/wicd/wicd-1.7.1b2.tar.bz2";
+    sha256 = "13ga6a2ip8dy8h49wvv02jxxfvpk5q5sm2wz76dy62y1xsrm23c1";
   };
 
   buildInputs = [ python ];
 
-  patches = [ ./no-var-install.patch ./pygtk.patch ./mkdir-networks.patch ];
+  patches = [ ./no-var-install.patch ./mkdir-networks.patch ./pygtk.patch ./no-optimization.patch ];
 
   # Should I be using pygtk's propogated build inputs?
+  # !!! Should use makeWrapper.
   postPatch = ''
+    # We don't have "python2".
+    substituteInPlace wicd/wicd-daemon.py --replace 'misc.find_path("python2")' "'${python}/bin/python'"
+    
     substituteInPlace in/scripts=wicd.in --subst-var-by TEMPLATE-DEFAULT $out/share/other/dhclient.conf.template.default
+    
     sed -i "2iexport PATH=\$PATH\$\{PATH:+:\}${python}/bin:${wpa_supplicant}/sbin:${dhcp}/sbin:${wirelesstools}/sbin:${nettools}/sbin:${iproute}/sbin" in/scripts=wicd.in
     sed -i "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pygobject})/gtk-2.0:$(toPythonPath ${pythonDBus})" in/scripts=wicd.in
     sed -i "4iexport LC_ALL=\\\"${locale}\\\"" in/scripts=wicd.in
@@ -56,7 +61,7 @@ stdenv.mkDerivation rec {
     --icons=$out/share/icons/hicolour/ \
     --translations=$out/share/locale/ \
     --autostart=$out/etc/xdg/autostart/ \
-    --varlib=$out/share/ \
+    --varlib=/var/lib/wicd/ \
     --docdir=$out/share/doc/ \
     --mandir=$out/share/man/ \
     --kdedir=$out/share/autostart/ \
@@ -74,6 +79,12 @@ stdenv.mkDerivation rec {
     python setup.py install --prefix=$out
     ensureDir $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 = {