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.nix29
1 files changed, 22 insertions, 7 deletions
diff --git a/pkgs/tools/networking/wicd/default.nix b/pkgs/tools/networking/wicd/default.nix
index 52bbf7d7a1fa6..70cc4a3b46cfb 100644
--- a/pkgs/tools/networking/wicd/default.nix
+++ b/pkgs/tools/networking/wicd/default.nix
@@ -6,11 +6,11 @@
 # on urwid which has not been packaged at this time (2009-12-27).
 
 stdenv.mkDerivation rec {
-  name = "wicd-1.6.2.2";
+  name = "wicd-1.7.0";
   
   src = fetchurl {
-    url = "mirror://sourceforge/wicd/files/wicd-stable/${name}/${name}.tar.bz2";
-    sha256 = "1gpjrlanz7rrzkchnpm1dgik333rz1fsg4c4046c5pwdfpp1crxr";
+    url = "mirror://sourceforge/project/wicd/wicd-stable/${name}/${name}.tar.bz2";
+    sha256 = "0civfmpjlsvnaiw7fkpq34mh5ndhfzb9mkl3q2d3rjd4z0mnki8l";
   };
 
   buildInputs = [ python ];
@@ -19,24 +19,34 @@ stdenv.mkDerivation rec {
 
   # Should I be using pygtk's propogated build inputs?
   postPatch = ''
+    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
     sed -i "2iexport PATH=\$PATH\$\{PATH:+:\}${python}/bin" in/scripts=wicd-client.in
     sed -i "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${pythonDBus})" in/scripts=wicd-client.in
+    sed -i "2iexport PATH=\$PATH\$\{PATH:+:\}${python}/bin" in/scripts=wicd-gtk.in
+    sed -i "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${pythonDBus})" in/scripts=wicd-gtk.in
+    sed -i "2iexport PATH=\$PATH\$\{PATH:+:\}${python}/bin" in/scripts=wicd-cli.in
+    sed -i "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${pythonDBus})" in/scripts=wicd-cli.in
   '';
 
   configurePhase = ''
     python setup.py configure \
     --lib=$out/lib/ \
-    --etc=/var/lib/wicd/ \
     --share=$out/share/ \
+    --etc=/var/lib/wicd/ \
     --scripts=$out/etc/scripts/ \
-    --images=$out/share/pixmaps/ \
+    --pixmaps=$out/share/pixmaps/ \
+    --images=$out/share/pixmaps/wicd/ \
     --encryption=$out/etc/encryption/templates/ \
     --bin=$out/bin/ \
     --sbin=$out/sbin/ \
-    --backends=$out/lib/backends/ \
+    --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/ \
@@ -60,7 +70,11 @@ stdenv.mkDerivation rec {
     --no-install-ncurses \
   '';
 
-  installPhase = ''python setup.py install --prefix=$out'';
+  installPhase = ''
+    python setup.py install --prefix=$out
+    ensureDir $out/share/other
+    cp other/dhclient.conf.template.default $out/share/other/dhclient.conf.template.default
+  '';
 
   meta = {
     homepage = http://wicd.net/;
@@ -74,6 +88,7 @@ stdenv.mkDerivation rec {
       encryption types, such as WPA and WEP. Wicd will automatically
       connect at startup to any preferred network within range.
     '';
+    maintainers = [ stdenv.lib.maintainers.roconnor ];
     license="GPLv2";
   };
 }