forked from mirrors/nixpkgs
#379 Update wicd to 1.7.2.4, fix patches, disable translations
This commit is contained in:
parent
0d191de368
commit
2393f6b96f
|
@ -6,16 +6,17 @@
|
||||||
# on urwid which has not been packaged at this time (2009-12-27).
|
# on urwid which has not been packaged at this time (2009-12-27).
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "wicd-1.7.1-beta2";
|
name = "wicd-${version}";
|
||||||
|
version = "1.7.2.4";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/wicd/wicd-1.7.1b2.tar.bz2";
|
url = "https://launchpad.net/wicd/1.7/${version}/+download/${name}.tar.gz";
|
||||||
sha256 = "13ga6a2ip8dy8h49wvv02jxxfvpk5q5sm2wz76dy62y1xsrm23c1";
|
sha256 = "15ywgh60xzmp5z8l1kzics7yi95isrjg1paz42dvp7dlpdfzpzfw";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ python ];
|
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 I be using pygtk's propogated build inputs?
|
||||||
# !!! Should use makeWrapper.
|
# !!! Should use makeWrapper.
|
||||||
|
@ -24,7 +25,7 @@ stdenv.mkDerivation rec {
|
||||||
substituteInPlace wicd/wicd-daemon.py --replace 'misc.find_path("python2")' "'${python}/bin/python'"
|
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
|
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 "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 "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 "4iexport LC_ALL=\\\"${locale}\\\"" in/scripts=wicd.in
|
||||||
|
@ -57,11 +58,14 @@ stdenv.mkDerivation rec {
|
||||||
--suspend=$out/etc/acpi/suspend.d/ \
|
--suspend=$out/etc/acpi/suspend.d/ \
|
||||||
--pmutils=$out/lib/pm-utils/sleep.d/ \
|
--pmutils=$out/lib/pm-utils/sleep.d/ \
|
||||||
--dbus=$out/etc/dbus-1/system.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/ \
|
--desktop=$out/share/applications/ \
|
||||||
--icons=$out/share/icons/hicolour/ \
|
--icons=$out/share/icons/hicolour/ \
|
||||||
--translations=$out/share/locale/ \
|
--translations=$out/share/locale/ \
|
||||||
--autostart=$out/etc/xdg/autostart/ \
|
--autostart=$out/etc/xdg/autostart/ \
|
||||||
--varlib=/var/lib/wicd/ \
|
--varlib=$out/var/lib/ \
|
||||||
--docdir=$out/share/doc/ \
|
--docdir=$out/share/doc/ \
|
||||||
--mandir=$out/share/man/ \
|
--mandir=$out/share/man/ \
|
||||||
--kdedir=$out/share/autostart/ \
|
--kdedir=$out/share/autostart/ \
|
||||||
|
@ -76,7 +80,7 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
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
|
mkdir -p $out/share/other
|
||||||
cp other/dhclient.conf.template.default $out/share/other/dhclient.conf.template.default
|
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"
|
echo "wpa2-ttls" >> "$out/etc/encryption/templates/active"
|
||||||
|
|
||||||
# have wicd generate upstart events
|
# have wicd generate upstart events
|
||||||
echo '#!/bin/sh
|
# echo '#!/bin/sh
|
||||||
initctl emit -n wicd-preconnect ITYPE="$1" ESSID="$2" BSSID="$3"' > $out/etc/scripts/preconnect/upstart-emit
|
# initctl emit -n wicd-preconnect ITYPE="$1" ESSID="$2" BSSID="$3"' > $out/etc/scripts/preconnect/upstart-emit
|
||||||
echo '#!/bin/sh
|
# echo '#!/bin/sh
|
||||||
initctl emit -n wicd-postconnect ITYPE="$1" ESSID="$2" BSSID="$3"
|
# initctl emit -n wicd-postconnect ITYPE="$1" ESSID="$2" BSSID="$3"
|
||||||
initctl emit -n ip-up' > $out/etc/scripts/postconnect/upstart-emit
|
# initctl emit -n ip-up' > $out/etc/scripts/postconnect/upstart-emit
|
||||||
echo '#!/bin/sh
|
# echo '#!/bin/sh
|
||||||
initctl emit -n wicd-predisconnect ITYPE="$1" ESSID="$2" BSSID="$3"' > $out/etc/scripts/predisconnect/upstart-emit
|
# initctl emit -n wicd-predisconnect ITYPE="$1" ESSID="$2" BSSID="$3"' > $out/etc/scripts/predisconnect/upstart-emit
|
||||||
echo '#!/bin/sh
|
# echo '#!/bin/sh
|
||||||
initctl emit -n wicd-postdisconnect ITYPE="$1" ESSID="$2" BSSID="$3"
|
# initctl emit -n wicd-postdisconnect ITYPE="$1" ESSID="$2" BSSID="$3"
|
||||||
initctl emit -n ip-down' > $out/etc/scripts/postdisconnect/upstart-emit
|
# initctl emit -n ip-down' > $out/etc/scripts/postdisconnect/upstart-emit
|
||||||
chmod a+x $out/etc/scripts/*/upstart-emit
|
# chmod a+x $out/etc/scripts/*/upstart-emit
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -8,14 +8,14 @@ With optimizations on, python will overwrite the nix store.
|
||||||
-exec %PYTHON% -O %SHARE%daemon/wicd-daemon.py $@
|
-exec %PYTHON% -O %SHARE%daemon/wicd-daemon.py $@
|
||||||
+exec %PYTHON% -B %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.2.4/wicd/wicd-daemon.py 2012-04-30 21:19:45.000000000 +0200
|
||||||
+++ wicd-1.7.1b2/wicd/wicd-daemon.py 2011-04-07 08:28:59.111311223 -0400
|
+++ wicd-1.7.2.4/wicd/wicd-daemon.pynew 2013-03-14 21:35:23.250306592 +0100
|
||||||
@@ -1806,7 +1806,7 @@
|
@@ -1812,7 +1812,7 @@
|
||||||
wicd_bus = dbus.service.BusName('org.wicd.daemon', bus=bus)
|
|
||||||
daemon = WicdDaemon(wicd_bus, auto_connect=auto_connect)
|
daemon = WicdDaemon(wicd_bus, auto_connect=auto_connect)
|
||||||
|
child_pid = None
|
||||||
if not no_poll:
|
if not no_poll:
|
||||||
- child_pid = Popen([misc.find_path("python2"), "-O",
|
- child_pid = Popen([wpath.python, "-O",
|
||||||
+ child_pid = Popen([misc.find_path("python2"), "-B",
|
+ child_pid = Popen([wpath.python, "-B",
|
||||||
os.path.join(wpath.daemon, "monitor.py")],
|
os.path.join(wpath.daemon, "monitor.py")],
|
||||||
shell=False, close_fds=True).pid
|
shell=False, close_fds=True).pid
|
||||||
atexit.register(on_exit, child_pid)
|
atexit.register(on_exit, child_pid)
|
||||||
|
|
15
pkgs/tools/networking/wicd/no-trans.patch
Normal file
15
pkgs/tools/networking/wicd/no-trans.patch
Normal file
|
@ -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)
|
|
@ -1,25 +1,17 @@
|
||||||
The install tries to create files in /var. This patch removes those steps.
|
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.2.4/setup.py 2013-03-14 21:28:21.360580941 +0100
|
||||||
+++ wicd-1.7.0/setup.py 2010-11-16 22:15:33.855977242 -0500
|
+++ wicd-1.7.2.4/setup.py 2013-03-14 21:22:50.125721943 +0100
|
||||||
@@ -493,11 +493,8 @@
|
@@ -505,11 +505,8 @@
|
||||||
print "Using init file",(wpath.init, wpath.initfile)
|
(wpath.dbus_service, ['other/org.wicd.daemon.service']),
|
||||||
data = [
|
(wpath.systemd, ['other/wicd.service']),
|
||||||
(wpath.dbus, ['other/wicd.conf']),
|
(wpath.logrotate, ['other/wicd.logrotate']),
|
||||||
- (wpath.log, [empty_file]),
|
- (wpath.log, [empty_file]),
|
||||||
- (wpath.etc, ['other/dhclient.conf.template.default']),
|
- (wpath.etc, ['other/dhclient.conf.template.default']),
|
||||||
(wpath.encryption, [('encryption/templates/' + b) for b in
|
(wpath.encryption, [('encryption/templates/' + b) for b in
|
||||||
os.listdir('encryption/templates') if not b.startswith('.')]),
|
os.listdir('encryption/templates') if not b.startswith('.')]),
|
||||||
- (wpath.networks, [empty_file]),
|
- (wpath.networks, [empty_file]),
|
||||||
(wpath.sbin, ['scripts/wicd']),
|
(wpath.sbin, ['scripts/wicd']),
|
||||||
(wpath.daemon, ['wicd/monitor.py', 'wicd/wicd-daemon.py',
|
(wpath.daemon, ['wicd/monitor.py', 'wicd/wicd-daemon.py',
|
||||||
'wicd/suspend.py', 'wicd/autoconnect.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']))
|
|
||||||
|
|
Loading…
Reference in a new issue