about summary refs log tree commit diff
path: root/pkgs/tools/networking/wicd
diff options
context:
space:
mode:
authorRussell O'Connor <roconnor@theorem.ca>2011-04-07 15:39:53 +0000
committerRussell O'Connor <roconnor@theorem.ca>2011-04-07 15:39:53 +0000
commit78f9628037ef319e54898a2938c9282a72b1ee98 (patch)
treee8786d3c26d4697a25c74848720c8462b1eb87f9 /pkgs/tools/networking/wicd
parent16d86dcbe29f74c5cd12f102fd7a55999fd8f1bd (diff)
downloadnixlib-78f9628037ef319e54898a2938c9282a72b1ee98.tar
nixlib-78f9628037ef319e54898a2938c9282a72b1ee98.tar.gz
nixlib-78f9628037ef319e54898a2938c9282a72b1ee98.tar.bz2
nixlib-78f9628037ef319e54898a2938c9282a72b1ee98.tar.lz
nixlib-78f9628037ef319e54898a2938c9282a72b1ee98.tar.xz
nixlib-78f9628037ef319e54898a2938c9282a72b1ee98.tar.zst
nixlib-78f9628037ef319e54898a2938c9282a72b1ee98.zip
wicd should no longer write into the nix store.
But it doesn't compile optimized bytecode. :(  I would be good if someone who actually knew python could give this package some love.

svn path=/nixpkgs/trunk/; revision=26742
Diffstat (limited to 'pkgs/tools/networking/wicd')
-rw-r--r--pkgs/tools/networking/wicd/default.nix4
-rw-r--r--pkgs/tools/networking/wicd/no-optimization.patch21
-rw-r--r--pkgs/tools/networking/wicd/no-var-install.patch9
3 files changed, 32 insertions, 2 deletions
diff --git a/pkgs/tools/networking/wicd/default.nix b/pkgs/tools/networking/wicd/default.nix
index a8490e39b93d..19f30713a9fe 100644
--- a/pkgs/tools/networking/wicd/default.nix
+++ b/pkgs/tools/networking/wicd/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
 
   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.
@@ -61,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/ \
diff --git a/pkgs/tools/networking/wicd/no-optimization.patch b/pkgs/tools/networking/wicd/no-optimization.patch
new file mode 100644
index 000000000000..fb04846d85b1
--- /dev/null
+++ b/pkgs/tools/networking/wicd/no-optimization.patch
@@ -0,0 +1,21 @@
+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.1b2/wicd/wicd-daemon.py.old     2011-04-07 08:28:38.668311226 -0400
++++ wicd-1.7.1b2/wicd/wicd-daemon.py 2011-04-07 08:28:59.111311223 -0400
+@@ -1806,7 +1806,7 @@
+     wicd_bus = dbus.service.BusName('org.wicd.daemon', bus=bus)
+     daemon = WicdDaemon(wicd_bus, auto_connect=auto_connect)
+     if not no_poll:
+-        child_pid = Popen([misc.find_path("python2"), "-O", 
++        child_pid = Popen([misc.find_path("python2"), "-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
index 9a333332fcf2..95a5499f283c 100644
--- a/pkgs/tools/networking/wicd/no-var-install.patch
+++ b/pkgs/tools/networking/wicd/no-var-install.patch
@@ -14,3 +14,12 @@ The install tries to create files in /var.  This patch removes those steps.
      (wpath.sbin,  ['scripts/wicd']),  
      (wpath.daemon, ['wicd/monitor.py', 'wicd/wicd-daemon.py',
                   'wicd/suspend.py', 'wicd/autoconnect.py']), 
+@@ -558,7 +555,7 @@
+     if not wpath.no_install_docs:
+         data.append((wpath.docdir, ['INSTALL', 'LICENSE', 'AUTHORS',
+                                      'README', 'CHANGES', ]))
+-        data.append((wpath.varlib, ['other/WHEREAREMYFILES']))
++        data.append((wpath.share, ['other/WHEREAREMYFILES']))
+     if not wpath.no_install_kde:
+         if not wpath.no_install_gtk:
+             data.append((wpath.kdedir, ['other/wicd-tray.desktop']))