diff options
author | Cillian de Róiste <goibhniu@fsfe.org> | 2013-03-15 01:00:19 +0100 |
---|---|---|
committer | Cillian de Róiste <goibhniu@fsfe.org> | 2013-03-15 01:00:19 +0100 |
commit | 0037e518b06ac491cc19b6fcbd6e143c28f2d5de (patch) | |
tree | c2b0f56f972d91146f038bfabcc4f8b08653d7ab /pkgs/tools | |
parent | e0b0be9fb37e519688b4665d91dccb049fa60d60 (diff) | |
parent | ef3da5eecd2ae96f1953efc8e9ddf1110b3ab2b2 (diff) | |
download | nixlib-0037e518b06ac491cc19b6fcbd6e143c28f2d5de.tar nixlib-0037e518b06ac491cc19b6fcbd6e143c28f2d5de.tar.gz nixlib-0037e518b06ac491cc19b6fcbd6e143c28f2d5de.tar.bz2 nixlib-0037e518b06ac491cc19b6fcbd6e143c28f2d5de.tar.lz nixlib-0037e518b06ac491cc19b6fcbd6e143c28f2d5de.tar.xz nixlib-0037e518b06ac491cc19b6fcbd6e143c28f2d5de.tar.zst nixlib-0037e518b06ac491cc19b6fcbd6e143c28f2d5de.zip |
Merge branch 'wicd-gobject'
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/networking/wicd/default.nix | 43 | ||||
-rw-r--r-- | pkgs/tools/networking/wicd/no-optimization.patch | 12 | ||||
-rw-r--r-- | pkgs/tools/networking/wicd/no-trans.patch | 15 | ||||
-rw-r--r-- | pkgs/tools/networking/wicd/no-var-install.patch | 38 |
4 files changed, 53 insertions, 55 deletions
diff --git a/pkgs/tools/networking/wicd/default.nix b/pkgs/tools/networking/wicd/default.nix index 57c2e1d6d3c8..d63711e12ac8 100644 --- a/pkgs/tools/networking/wicd/default.nix +++ b/pkgs/tools/networking/wicd/default.nix @@ -1,21 +1,22 @@ {stdenv, fetchurl, python, pygobject, pycairo, pyGtkGlade, pythonDBus, - wpa_supplicant, dhcp, dhcpcd, wirelesstools, nettools, openresolv, iproute, + wpa_supplicant, dhcp, dhcpcd, wirelesstools, nettools, openresolv, iproute, iputils, locale ? "C" }: # Wicd has a ncurses interface that we do not build because it depends # 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,16 +25,16 @@ 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})/gtk-2.0:$(toPythonPath ${pythonDBus})" in/scripts=wicd.in + + sed -i "2iexport PATH=\$PATH\$\{PATH:+:\}${python}/bin:${wpa_supplicant}/sbin:${dhcpcd}/sbin:${dhcp}/sbin:${wirelesstools}/sbin:${nettools}/sbin:${nettools}/bin:${iputils}/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 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 "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject}):$(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 "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject}):$(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 + sed -i "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject}):$(toPythonPath ${pycairo}):$(toPythonPath ${pythonDBus})" in/scripts=wicd-cli.in ''; configurePhase = '' @@ -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 @@ -85,19 +89,6 @@ stdenv.mkDerivation rec { # <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" - - # 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 ''; 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']), + |