#379 Update wicd to 1.7.2.4, fix patches, disable translations

+58 -47
+22 -18
pkgs/tools/networking/wicd/default.nix
··· 6 6 # on urwid which has not been packaged at this time (2009-12-27). 7 7 8 8 stdenv.mkDerivation rec { 9 - name = "wicd-1.7.1-beta2"; 9 + name = "wicd-${version}"; 10 + version = "1.7.2.4"; 10 11 11 12 src = fetchurl { 12 - url = "mirror://sourceforge/wicd/wicd-1.7.1b2.tar.bz2"; 13 - sha256 = "13ga6a2ip8dy8h49wvv02jxxfvpk5q5sm2wz76dy62y1xsrm23c1"; 13 + url = "https://launchpad.net/wicd/1.7/${version}/+download/${name}.tar.gz"; 14 + sha256 = "15ywgh60xzmp5z8l1kzics7yi95isrjg1paz42dvp7dlpdfzpzfw"; 14 15 }; 15 16 16 17 buildInputs = [ python ]; 17 18 18 - patches = [ ./no-var-install.patch ./mkdir-networks.patch ./pygtk.patch ./no-optimization.patch ]; 19 + patches = [ ./no-var-install.patch ./no-trans.patch ./mkdir-networks.patch ./pygtk.patch ./no-optimization.patch ]; 19 20 20 21 # Should I be using pygtk's propogated build inputs? 21 22 # !!! Should use makeWrapper. ··· 24 25 substituteInPlace wicd/wicd-daemon.py --replace 'misc.find_path("python2")' "'${python}/bin/python'" 25 26 26 27 substituteInPlace in/scripts=wicd.in --subst-var-by TEMPLATE-DEFAULT $out/share/other/dhclient.conf.template.default 27 - 28 + 28 29 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 29 30 sed -i "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pygobject}):$(toPythonPath ${pythonDBus})" in/scripts=wicd.in 30 31 sed -i "4iexport LC_ALL=\\\"${locale}\\\"" in/scripts=wicd.in ··· 57 58 --suspend=$out/etc/acpi/suspend.d/ \ 58 59 --pmutils=$out/lib/pm-utils/sleep.d/ \ 59 60 --dbus=$out/etc/dbus-1/system.d/ \ 61 + --dbus-service=$out/etc/dbus-1/system-services/ \ 62 + --systemd=$out/lib/systemd/ \ 63 + --logrotate=$out/etc/logrotate.d/ \ 60 64 --desktop=$out/share/applications/ \ 61 65 --icons=$out/share/icons/hicolour/ \ 62 66 --translations=$out/share/locale/ \ 63 67 --autostart=$out/etc/xdg/autostart/ \ 64 - --varlib=/var/lib/wicd/ \ 68 + --varlib=$out/var/lib/ \ 65 69 --docdir=$out/share/doc/ \ 66 70 --mandir=$out/share/man/ \ 67 71 --kdedir=$out/share/autostart/ \ ··· 76 80 ''; 77 81 78 82 installPhase = '' 79 - python setup.py install --prefix=$out 83 + python setup.py install --prefix=$out --install-lib=$out/lib/${python.libPrefix}/site-packages 80 84 mkdir -p $out/share/other 81 85 cp other/dhclient.conf.template.default $out/share/other/dhclient.conf.template.default 82 86 ··· 87 91 echo "wpa2-ttls" >> "$out/etc/encryption/templates/active" 88 92 89 93 # have wicd generate upstart events 90 - echo '#!/bin/sh 91 - initctl emit -n wicd-preconnect ITYPE="$1" ESSID="$2" BSSID="$3"' > $out/etc/scripts/preconnect/upstart-emit 92 - echo '#!/bin/sh 93 - initctl emit -n wicd-postconnect ITYPE="$1" ESSID="$2" BSSID="$3" 94 - initctl emit -n ip-up' > $out/etc/scripts/postconnect/upstart-emit 95 - echo '#!/bin/sh 96 - initctl emit -n wicd-predisconnect ITYPE="$1" ESSID="$2" BSSID="$3"' > $out/etc/scripts/predisconnect/upstart-emit 97 - echo '#!/bin/sh 98 - initctl emit -n wicd-postdisconnect ITYPE="$1" ESSID="$2" BSSID="$3" 99 - initctl emit -n ip-down' > $out/etc/scripts/postdisconnect/upstart-emit 100 - chmod a+x $out/etc/scripts/*/upstart-emit 94 + # echo '#!/bin/sh 95 + # initctl emit -n wicd-preconnect ITYPE="$1" ESSID="$2" BSSID="$3"' > $out/etc/scripts/preconnect/upstart-emit 96 + # echo '#!/bin/sh 97 + # initctl emit -n wicd-postconnect ITYPE="$1" ESSID="$2" BSSID="$3" 98 + # initctl emit -n ip-up' > $out/etc/scripts/postconnect/upstart-emit 99 + # echo '#!/bin/sh 100 + # initctl emit -n wicd-predisconnect ITYPE="$1" ESSID="$2" BSSID="$3"' > $out/etc/scripts/predisconnect/upstart-emit 101 + # echo '#!/bin/sh 102 + # initctl emit -n wicd-postdisconnect ITYPE="$1" ESSID="$2" BSSID="$3" 103 + # initctl emit -n ip-down' > $out/etc/scripts/postdisconnect/upstart-emit 104 + # chmod a+x $out/etc/scripts/*/upstart-emit 101 105 ''; 102 106 103 107 meta = {
+6 -6
pkgs/tools/networking/wicd/no-optimization.patch
··· 8 8 -exec %PYTHON% -O %SHARE%daemon/wicd-daemon.py $@ 9 9 +exec %PYTHON% -B %SHARE%daemon/wicd-daemon.py $@ 10 10 11 - --- wicd-1.7.1b2/wicd/wicd-daemon.py.old 2011-04-07 08:28:38.668311226 -0400 12 - +++ wicd-1.7.1b2/wicd/wicd-daemon.py 2011-04-07 08:28:59.111311223 -0400 13 - @@ -1806,7 +1806,7 @@ 14 - wicd_bus = dbus.service.BusName('org.wicd.daemon', bus=bus) 11 + --- wicd-1.7.2.4/wicd/wicd-daemon.py 2012-04-30 21:19:45.000000000 +0200 12 + +++ wicd-1.7.2.4/wicd/wicd-daemon.pynew 2013-03-14 21:35:23.250306592 +0100 13 + @@ -1812,7 +1812,7 @@ 15 14 daemon = WicdDaemon(wicd_bus, auto_connect=auto_connect) 15 + child_pid = None 16 16 if not no_poll: 17 - - child_pid = Popen([misc.find_path("python2"), "-O", 18 - + child_pid = Popen([misc.find_path("python2"), "-B", 17 + - child_pid = Popen([wpath.python, "-O", 18 + + child_pid = Popen([wpath.python, "-B", 19 19 os.path.join(wpath.daemon, "monitor.py")], 20 20 shell=False, close_fds=True).pid 21 21 atexit.register(on_exit, child_pid)
+15
pkgs/tools/networking/wicd/no-trans.patch
··· 1 + --- wicd-1.7.2.4/setup.py 2013-03-14 21:28:21.360580941 +0100 2 + +++ wicd-1.7.2.4/setup.py 2013-03-14 21:22:50.125721943 +0100 3 + @@ -599,12 +599,6 @@ 4 + if not wpath.no_install_pmutils: 5 + data.append((wpath.pmutils, ['other/55wicd'])) 6 + print 'Using pid path', os.path.basename(wpath.pidfile) 7 + - print 'Language support for', 8 + - for pofile in glob('po/*.po'): 9 + - language = pofile.replace('po/', '').replace('.po', '') 10 + - print language, 11 + - data.append((wpath.translations + language + '/LC_MESSAGES/', 12 + - ['translations/' + language + '/LC_MESSAGES/wicd.mo'])) 13 + print 14 + except Exception, e: 15 + print str(e)
+15 -23
pkgs/tools/networking/wicd/no-var-install.patch
··· 1 1 The install tries to create files in /var. This patch removes those steps. 2 2 3 - --- wicd-1.7.0/setup.py 2010-01-14 23:49:11.000000000 -0500 4 - +++ wicd-1.7.0/setup.py 2010-11-16 22:15:33.855977242 -0500 5 - @@ -493,11 +493,8 @@ 6 - print "Using init file",(wpath.init, wpath.initfile) 7 - data = [ 8 - (wpath.dbus, ['other/wicd.conf']), 9 - - (wpath.log, [empty_file]), 10 - - (wpath.etc, ['other/dhclient.conf.template.default']), 11 - (wpath.encryption, [('encryption/templates/' + b) for b in 12 - os.listdir('encryption/templates') if not b.startswith('.')]), 13 - - (wpath.networks, [empty_file]), 14 - (wpath.sbin, ['scripts/wicd']), 15 - (wpath.daemon, ['wicd/monitor.py', 'wicd/wicd-daemon.py', 16 - 'wicd/suspend.py', 'wicd/autoconnect.py']), 17 - @@ -558,7 +555,7 @@ 18 - if not wpath.no_install_docs: 19 - data.append((wpath.docdir, ['INSTALL', 'LICENSE', 'AUTHORS', 20 - 'README', 'CHANGES', ])) 21 - - data.append((wpath.varlib, ['other/WHEREAREMYFILES'])) 22 - + data.append((wpath.share, ['other/WHEREAREMYFILES'])) 23 - if not wpath.no_install_kde: 24 - if not wpath.no_install_gtk: 25 - data.append((wpath.kdedir, ['other/wicd-tray.desktop'])) 3 + --- wicd-1.7.2.4/setup.py 2013-03-14 21:28:21.360580941 +0100 4 + +++ wicd-1.7.2.4/setup.py 2013-03-14 21:22:50.125721943 +0100 5 + @@ -505,11 +505,8 @@ 6 + (wpath.dbus_service, ['other/org.wicd.daemon.service']), 7 + (wpath.systemd, ['other/wicd.service']), 8 + (wpath.logrotate, ['other/wicd.logrotate']), 9 + - (wpath.log, [empty_file]), 10 + - (wpath.etc, ['other/dhclient.conf.template.default']), 11 + (wpath.encryption, [('encryption/templates/' + b) for b in 12 + os.listdir('encryption/templates') if not b.startswith('.')]), 13 + - (wpath.networks, [empty_file]), 14 + (wpath.sbin, ['scripts/wicd']), 15 + (wpath.daemon, ['wicd/monitor.py', 'wicd/wicd-daemon.py', 16 + 'wicd/suspend.py', 'wicd/autoconnect.py']), 17 +