about summary refs log tree commit diff
path: root/pkgs/tools/networking/wicd
diff options
context:
space:
mode:
authorCillian de Róiste <goibhniu@fsfe.org>2013-03-15 00:14:30 +0100
committerCillian de Róiste <goibhniu@fsfe.org>2013-03-15 00:14:30 +0100
commit2393f6b96f1a1fd28cbbb7e344ea0366ddf4cc64 (patch)
tree6784c995ab8db5696bd24884313491b650adf80a /pkgs/tools/networking/wicd
parent0d191de368ed76fed9fa567a668933e452c807e0 (diff)
downloadnixlib-2393f6b96f1a1fd28cbbb7e344ea0366ddf4cc64.tar
nixlib-2393f6b96f1a1fd28cbbb7e344ea0366ddf4cc64.tar.gz
nixlib-2393f6b96f1a1fd28cbbb7e344ea0366ddf4cc64.tar.bz2
nixlib-2393f6b96f1a1fd28cbbb7e344ea0366ddf4cc64.tar.lz
nixlib-2393f6b96f1a1fd28cbbb7e344ea0366ddf4cc64.tar.xz
nixlib-2393f6b96f1a1fd28cbbb7e344ea0366ddf4cc64.tar.zst
nixlib-2393f6b96f1a1fd28cbbb7e344ea0366ddf4cc64.zip
#379 Update wicd to 1.7.2.4, fix patches, disable translations
Diffstat (limited to 'pkgs/tools/networking/wicd')
-rw-r--r--pkgs/tools/networking/wicd/default.nix40
-rw-r--r--pkgs/tools/networking/wicd/no-optimization.patch12
-rw-r--r--pkgs/tools/networking/wicd/no-trans.patch15
-rw-r--r--pkgs/tools/networking/wicd/no-var-install.patch38
4 files changed, 58 insertions, 47 deletions
diff --git a/pkgs/tools/networking/wicd/default.nix b/pkgs/tools/networking/wicd/default.nix
index aa4df61306c2..0f723f98a23e 100644
--- a/pkgs/tools/networking/wicd/default.nix
+++ b/pkgs/tools/networking/wicd/default.nix
@@ -6,16 +6,17 @@
 # on urwid which has not been packaged at this time (2009-12-27).
 
 stdenv.mkDerivation rec {
-  name = "wicd-1.7.1-beta2";
+  name = "wicd-${version}";
+  version = "1.7.2.4";
   
   src = fetchurl {
-    url = "mirror://sourceforge/wicd/wicd-1.7.1b2.tar.bz2";
-    sha256 = "13ga6a2ip8dy8h49wvv02jxxfvpk5q5sm2wz76dy62y1xsrm23c1";
+    url = "https://launchpad.net/wicd/1.7/${version}/+download/${name}.tar.gz";
+    sha256 = "15ywgh60xzmp5z8l1kzics7yi95isrjg1paz42dvp7dlpdfzpzfw";
   };
 
   buildInputs = [ python ];
 
-  patches = [ ./no-var-install.patch ./mkdir-networks.patch ./pygtk.patch ./no-optimization.patch ];
+  patches = [ ./no-var-install.patch ./no-trans.patch ./mkdir-networks.patch ./pygtk.patch ./no-optimization.patch ];
 
   # Should I be using pygtk's propogated build inputs?
   # !!! Should use makeWrapper.
@@ -24,7 +25,7 @@ stdenv.mkDerivation rec {
     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:${dhcpcd}/sbin:${dhcp}/sbin:${wirelesstools}/sbin:${nettools}/sbin:${openresolv}/sbin:${iproute}/sbin" in/scripts=wicd.in
     sed -i "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pygobject}):$(toPythonPath ${pythonDBus})" in/scripts=wicd.in
     sed -i "4iexport LC_ALL=\\\"${locale}\\\"" in/scripts=wicd.in
@@ -57,11 +58,14 @@ stdenv.mkDerivation rec {
     --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/hicolour/ \
     --translations=$out/share/locale/ \
     --autostart=$out/etc/xdg/autostart/ \
-    --varlib=/var/lib/wicd/ \
+    --varlib=$out/var/lib/ \
     --docdir=$out/share/doc/ \
     --mandir=$out/share/man/ \
     --kdedir=$out/share/autostart/ \
@@ -76,7 +80,7 @@ stdenv.mkDerivation rec {
   '';
 
   installPhase = ''
-    python setup.py install --prefix=$out
+    python setup.py install --prefix=$out --install-lib=$out/lib/${python.libPrefix}/site-packages
     mkdir -p $out/share/other
     cp other/dhclient.conf.template.default $out/share/other/dhclient.conf.template.default
 
@@ -87,17 +91,17 @@ stdenv.mkDerivation rec {
     echo "wpa2-ttls" >> "$out/etc/encryption/templates/active"
 
     # have wicd generate upstart events
-    echo '#!/bin/sh
-initctl emit -n wicd-preconnect ITYPE="$1" ESSID="$2" BSSID="$3"' > $out/etc/scripts/preconnect/upstart-emit
-    echo '#!/bin/sh
-initctl emit -n wicd-postconnect ITYPE="$1" ESSID="$2" BSSID="$3"
-initctl emit -n ip-up' > $out/etc/scripts/postconnect/upstart-emit
-    echo '#!/bin/sh
-initctl emit -n wicd-predisconnect ITYPE="$1" ESSID="$2" BSSID="$3"' > $out/etc/scripts/predisconnect/upstart-emit
-    echo '#!/bin/sh
-initctl emit -n wicd-postdisconnect ITYPE="$1" ESSID="$2" BSSID="$3"
-initctl emit -n ip-down' > $out/etc/scripts/postdisconnect/upstart-emit
-    chmod a+x $out/etc/scripts/*/upstart-emit
+#     echo '#!/bin/sh
+# initctl emit -n wicd-preconnect ITYPE="$1" ESSID="$2" BSSID="$3"' > $out/etc/scripts/preconnect/upstart-emit
+#     echo '#!/bin/sh
+# initctl emit -n wicd-postconnect ITYPE="$1" ESSID="$2" BSSID="$3"
+# initctl emit -n ip-up' > $out/etc/scripts/postconnect/upstart-emit
+#     echo '#!/bin/sh
+# initctl emit -n wicd-predisconnect ITYPE="$1" ESSID="$2" BSSID="$3"' > $out/etc/scripts/predisconnect/upstart-emit
+#     echo '#!/bin/sh
+# initctl emit -n wicd-postdisconnect ITYPE="$1" ESSID="$2" BSSID="$3"
+# initctl emit -n ip-down' > $out/etc/scripts/postdisconnect/upstart-emit
+#     chmod a+x $out/etc/scripts/*/upstart-emit
   '';
 
   meta = {
diff --git a/pkgs/tools/networking/wicd/no-optimization.patch b/pkgs/tools/networking/wicd/no-optimization.patch
index fb04846d85b1..785cae7b6ed5 100644
--- a/pkgs/tools/networking/wicd/no-optimization.patch
+++ b/pkgs/tools/networking/wicd/no-optimization.patch
@@ -8,14 +8,14 @@ With optimizations on, python will overwrite the nix store.
 -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)
+--- 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([misc.find_path("python2"), "-O", 
-+        child_pid = Popen([misc.find_path("python2"), "-B",
+-        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-trans.patch b/pkgs/tools/networking/wicd/no-trans.patch
new file mode 100644
index 000000000000..a4c5018e181c
--- /dev/null
+++ b/pkgs/tools/networking/wicd/no-trans.patch
@@ -0,0 +1,15 @@
+--- 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
+@@ -599,12 +599,6 @@
+     if not wpath.no_install_pmutils:
+         data.append((wpath.pmutils, ['other/55wicd']))
+     print 'Using pid path', os.path.basename(wpath.pidfile)
+-    print 'Language support for',
+-    for pofile in glob('po/*.po'):
+-        language = pofile.replace('po/', '').replace('.po', '')
+-        print language,
+-        data.append((wpath.translations + language + '/LC_MESSAGES/',
+-                    ['translations/' + language + '/LC_MESSAGES/wicd.mo']))
+     print
+ except Exception, e:
+     print str(e)
diff --git a/pkgs/tools/networking/wicd/no-var-install.patch b/pkgs/tools/networking/wicd/no-var-install.patch
index 95a5499f283c..b01f0e5a438a 100644
--- a/pkgs/tools/networking/wicd/no-var-install.patch
+++ b/pkgs/tools/networking/wicd/no-var-install.patch
@@ -1,25 +1,17 @@
 The install tries to create files in /var.  This patch removes those steps.
 
---- wicd-1.7.0/setup.py 2010-01-14 23:49:11.000000000 -0500
-+++ wicd-1.7.0/setup.py 2010-11-16 22:15:33.855977242 -0500
-@@ -493,11 +493,8 @@
-     print "Using init file",(wpath.init, wpath.initfile)
-     data = [
-     (wpath.dbus, ['other/wicd.conf']),
--    (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']), 
-@@ -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']))
+--- 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']), 
+