2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, python2Packages
|
2016-08-14 13:52:23 +02:00
|
|
|
, wpa_supplicant, dhcp, dhcpcd, wirelesstools
|
2018-07-21 02:44:44 +02:00
|
|
|
, nettools, openresolv, iproute, iputils }:
|
2010-01-07 18:49:45 +01:00
|
|
|
|
2016-08-14 13:52:23 +02:00
|
|
|
let
|
2016-11-25 09:30:45 +01:00
|
|
|
inherit (python2Packages) python pygobject2 dbus-python pyGtkGlade pycairo;
|
2016-08-14 13:52:23 +02:00
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "wicd";
|
2013-03-15 00:14:30 +01:00
|
|
|
version = "1.7.2.4";
|
2021-01-15 10:19:50 +01:00
|
|
|
|
2010-01-07 18:49:45 +01:00
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "https://launchpad.net/wicd/1.7/${version}/+download/${pname}-${version}.tar.gz";
|
2013-03-15 00:14:30 +01:00
|
|
|
sha256 = "15ywgh60xzmp5z8l1kzics7yi95isrjg1paz42dvp7dlpdfzpzfw";
|
2010-01-07 18:49:45 +01:00
|
|
|
};
|
|
|
|
|
2016-11-25 09:30:45 +01:00
|
|
|
buildInputs = with python2Packages; [
|
2016-08-14 13:52:23 +02:00
|
|
|
python Babel urwid notify
|
2015-03-10 22:19:51 +01:00
|
|
|
];
|
2010-01-07 18:49:45 +01:00
|
|
|
|
2013-03-31 10:27:46 +02:00
|
|
|
patches = [
|
|
|
|
./no-var-install.patch
|
|
|
|
./pygtk.patch
|
|
|
|
./no-optimization.patch
|
2021-01-15 10:19:50 +01:00
|
|
|
./dhclient.patch
|
2013-03-31 10:57:28 +02:00
|
|
|
./fix-app-icon.patch
|
2013-03-31 20:07:40 +02:00
|
|
|
./fix-gtk-issues.patch
|
2015-01-12 20:42:42 +01:00
|
|
|
./urwid-api-update.patch
|
2016-05-12 03:19:28 +02:00
|
|
|
./fix-curses.patch
|
2013-03-31 10:27:46 +02:00
|
|
|
];
|
2010-01-07 18:49:45 +01:00
|
|
|
|
2016-07-14 13:53:06 +02:00
|
|
|
# Should I be using pygtk's propagated build inputs?
|
2011-04-07 00:06:00 +02:00
|
|
|
# !!! Should use makeWrapper.
|
2010-01-07 18:49:45 +01:00
|
|
|
postPatch = ''
|
2011-04-07 00:06:00 +02:00
|
|
|
# We don't have "python2".
|
2016-08-14 13:52:23 +02:00
|
|
|
substituteInPlace wicd/wicd-daemon.py --replace 'misc.find_path("python2")' "'${python.interpreter}'"
|
2021-01-15 10:19:50 +01:00
|
|
|
|
2010-11-29 21:15:44 +01:00
|
|
|
substituteInPlace in/scripts=wicd.in --subst-var-by TEMPLATE-DEFAULT $out/share/other/dhclient.conf.template.default
|
2013-03-15 00:14:30 +01:00
|
|
|
|
2021-01-15 10:19:50 +01:00
|
|
|
sed -i "2iexport PATH=${lib.makeBinPath [ python wpa_supplicant dhcpcd dhcp wirelesstools nettools nettools iputils openresolv iproute ]}\$\{PATH:+:\}\$PATH" in/scripts=wicd.in
|
2016-09-11 23:24:51 +02:00
|
|
|
sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pygobject2}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd.in
|
2013-07-31 21:54:09 +02:00
|
|
|
sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-client.in
|
2016-09-11 23:24:51 +02:00
|
|
|
sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject2}):$(toPythonPath ${pygobject2})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-client.in
|
2013-07-31 21:54:09 +02:00
|
|
|
sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-gtk.in
|
2016-11-25 09:30:45 +01:00
|
|
|
sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject2}):$(toPythonPath ${pygobject2})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python}):$(toPythonPath ${python2Packages.notify})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-gtk.in
|
2013-07-31 21:54:09 +02:00
|
|
|
sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-cli.in
|
2016-09-11 23:24:51 +02:00
|
|
|
sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject2}):$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-cli.in
|
2014-09-17 20:28:14 +02:00
|
|
|
sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-curses.in
|
2016-11-25 09:30:45 +01:00
|
|
|
sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject2}):$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python}):$(toPythonPath ${python2Packages.urwid})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-curses.in
|
2013-04-04 11:43:09 +02:00
|
|
|
rm po/ast.po
|
2010-01-07 18:49:45 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
python setup.py configure \
|
|
|
|
--lib=$out/lib/ \
|
|
|
|
--share=$out/share/ \
|
2010-11-29 21:15:44 +01:00
|
|
|
--etc=/var/lib/wicd/ \
|
2010-01-07 18:49:45 +01:00
|
|
|
--scripts=$out/etc/scripts/ \
|
2010-11-29 21:15:44 +01:00
|
|
|
--pixmaps=$out/share/pixmaps/ \
|
|
|
|
--images=$out/share/pixmaps/wicd/ \
|
2010-01-07 18:49:45 +01:00
|
|
|
--encryption=$out/etc/encryption/templates/ \
|
|
|
|
--bin=$out/bin/ \
|
|
|
|
--sbin=$out/sbin/ \
|
2010-11-29 21:15:44 +01:00
|
|
|
--backends=$out/share/backends/ \
|
|
|
|
--daemon=$out/share/daemon/ \
|
|
|
|
--curses=$out/share/curses/ \
|
|
|
|
--gtk=$out/share/gtk/ \
|
|
|
|
--cli=$out/share/cli/ \
|
2010-01-07 18:49:45 +01:00
|
|
|
--networks=/var/lib/wicd/configurations/ \
|
|
|
|
--resume=$out/etc/acpi/resume.d/ \
|
|
|
|
--suspend=$out/etc/acpi/suspend.d/ \
|
|
|
|
--pmutils=$out/lib/pm-utils/sleep.d/ \
|
|
|
|
--dbus=$out/etc/dbus-1/system.d/ \
|
2013-03-15 00:14:30 +01:00
|
|
|
--dbus-service=$out/etc/dbus-1/system-services/ \
|
|
|
|
--systemd=$out/lib/systemd/ \
|
|
|
|
--logrotate=$out/etc/logrotate.d/ \
|
2010-01-07 18:49:45 +01:00
|
|
|
--desktop=$out/share/applications/ \
|
2013-04-09 07:26:31 +02:00
|
|
|
--icons=$out/share/icons/hicolor/ \
|
2010-01-07 18:49:45 +01:00
|
|
|
--translations=$out/share/locale/ \
|
|
|
|
--autostart=$out/etc/xdg/autostart/ \
|
2013-03-15 00:14:30 +01:00
|
|
|
--varlib=$out/var/lib/ \
|
2010-01-07 18:49:45 +01:00
|
|
|
--docdir=$out/share/doc/ \
|
|
|
|
--mandir=$out/share/man/ \
|
|
|
|
--kdedir=$out/share/autostart/ \
|
|
|
|
--python=${python}/bin/python \
|
|
|
|
--distro=nix \
|
|
|
|
--wicdgroup=users \
|
|
|
|
--no-install-init \
|
|
|
|
--no-install-kde \
|
|
|
|
--no-install-acpi \
|
|
|
|
--no-install-pmutils \
|
|
|
|
'';
|
|
|
|
|
2010-11-29 21:15:44 +01:00
|
|
|
installPhase = ''
|
2016-08-14 13:52:23 +02:00
|
|
|
python setup.py install --prefix=$out --install-lib=$out/${python.sitePackages}
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share/other
|
2010-11-29 21:15:44 +01:00
|
|
|
cp other/dhclient.conf.template.default $out/share/other/dhclient.conf.template.default
|
2011-01-13 11:03:20 +01:00
|
|
|
|
|
|
|
# Add a template for "WPA2 Enterprise" encryption as used, e.g., by the
|
|
|
|
# Eduroam network. Taken and adapted from
|
|
|
|
# <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"
|
2010-11-29 21:15:44 +01:00
|
|
|
'';
|
2010-01-07 18:49:45 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://wicd.net/";
|
2010-01-07 18:49:45 +01:00
|
|
|
description = "A wiredless and wired network manager";
|
2010-01-10 21:27:28 +01:00
|
|
|
longDescription=''
|
|
|
|
A complete network connection manager
|
|
|
|
Wicd supports wired and wireless networks, and capable of
|
|
|
|
creating and tracking profiles for both. It has a
|
|
|
|
template-based wireless encryption system, which allows the user
|
|
|
|
to easily add encryption methods used. It ships with some common
|
|
|
|
encryption types, such as WPA and WEP. Wicd will automatically
|
|
|
|
connect at startup to any preferred network within range.
|
|
|
|
'';
|
2015-05-27 21:56:04 +02:00
|
|
|
maintainers = [ maintainers.roconnor ];
|
2015-05-28 19:20:29 +02:00
|
|
|
license = licenses.gpl2;
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = platforms.linux;
|
2010-01-07 18:49:45 +01:00
|
|
|
};
|
|
|
|
}
|