···2727 (mkRemovedOptionModule [ "services" "mesos" ] "The corresponding package was removed from nixpkgs.")
2828 (mkRemovedOptionModule [ "services" "winstone" ] "The corresponding package was removed from nixpkgs.")
2929 (mkRemovedOptionModule [ "networking" "vpnc" ] "Use environment.etc.\"vpnc/service.conf\" instead.")
3030+ (mkRemovedOptionModule [ "networking" "wicd" ] "The corresponding package was removed from nixpkgs.")
3031 (mkRemovedOptionModule [ "environment" "blcr" "enable" ] "The BLCR module has been removed")
3132 (mkRemovedOptionModule [ "services" "beegfsEnable" ] "The BeeGFS module has been removed")
3233 (mkRemovedOptionModule [ "services" "beegfs" ] "The BeeGFS module has been removed")
···11+{ stdenv, lib, fetchFromGitHub, makeWrapper
22+33+# --- Runtime Dependencies ---
44+, bash, procps, iproute2, dnsmasq, iptables
55+, coreutils, flock, gawk, getopt, gnugrep, gnused, which
66+# `nmcli` is not required for create_ap.
77+# Use NetworkManager by default because it is very likely already present
88+, useNetworkManager ? true
99+, networkmanager
1010+1111+# --- WiFi Hotspot Dependencies ---
1212+, useWifiDependencies ? true
1313+, hostapd, iw
1414+# You only need this if 'iw' can not recognize your adapter.
1515+, useWirelessTools ? true
1616+, wirelesstools # for iwconfig
1717+# To fall back to haveged if entropy is low.
1818+# Defaulting to false because not having it does not break things.
1919+# If it is really needed, warnings will be logged to journal.
2020+, useHaveged ? false
2121+, haveged
2222+# You only need this if you wish to show WiFi QR codes in terminal
2323+, useQrencode ? true
2424+, qrencode
2525+}:
2626+2727+stdenv.mkDerivation rec {
2828+ pname = "linux-router";
2929+ version = "0.6.2";
3030+3131+ src = fetchFromGitHub {
3232+ owner = "garywill";
3333+ repo = "linux-router";
3434+ rev = "${version}";
3535+ sha256 = "193bnlwmjxsk0cri6xdylf218qayldn02pdnppvbd39ls361776z";
3636+ };
3737+3838+ nativeBuildInputs = [ makeWrapper ];
3939+4040+ dontBuild = true;
4141+4242+ installPhase = with lib; let
4343+ binPath = makeBinPath ([ procps iproute2 getopt bash dnsmasq
4444+ iptables coreutils which flock gnugrep gnused gawk ]
4545+ ++ optional useNetworkManager networkmanager
4646+ ++ optional useWifiDependencies hostapd
4747+ ++ optional useWifiDependencies iw
4848+ ++ optional (useWifiDependencies && useWirelessTools) wirelesstools
4949+ ++ optional (useWifiDependencies && useHaveged) haveged
5050+ ++ optional (useWifiDependencies && useQrencode) qrencode);
5151+ in
5252+ ''
5353+ mkdir -p $out/bin/ $out/.bin-wrapped
5454+ mv lnxrouter $out/.bin-wrapped/lnxrouter
5555+ makeWrapper $out/.bin-wrapped/lnxrouter $out/bin/lnxrouter --prefix PATH : ${binPath}
5656+ '';
5757+5858+ meta = with lib; {
5959+ homepage = "https://github.com/garywill/linux-router";
6060+ description = "Set Linux as router / Wifi hotspot / proxy in one command";
6161+ longDescription = ''
6262+ Features:
6363+6464+ - Create a NATed sub-network
6565+ - Provide Internet
6666+ - DHCP server and RA
6767+ - DNS server
6868+ - IPv6 (behind NATed LAN, like IPv4)
6969+ - Creating Wifi hotspot:
7070+ - Channel selecting
7171+ - Choose encryptions: WPA2/WPA, WPA2, WPA, No encryption
7272+ - Create AP on the same interface you are getting Internet (require same channel)
7373+ - Transparent proxy (redsocks)
7474+ - DNS proxy
7575+ - Compatible with NetworkManager (automatically set interface as unmanaged)
7676+ '';
7777+ license = licenses.lgpl21;
7878+ maintainers = with maintainers; [ x3ro ];
7979+ platforms = platforms.linux;
8080+ };
8181+}
···11-The install tries to create files in /var. This patch removes those steps.
22-33---- wicd-1.7.2.4/setup.py 2013-03-14 21:28:21.360580941 +0100
44-+++ wicd-1.7.2.4/setup.py 2013-03-14 21:22:50.125721943 +0100
55-@@ -505,11 +505,8 @@
66- (wpath.dbus_service, ['other/org.wicd.daemon.service']),
77- (wpath.systemd, ['other/wicd.service']),
88- (wpath.logrotate, ['other/wicd.logrotate']),
99-- (wpath.log, [empty_file]),
1010-- (wpath.etc, ['other/dhclient.conf.template.default']),
1111- (wpath.encryption, [('encryption/templates/' + b) for b in
1212- os.listdir('encryption/templates') if not b.startswith('.')]),
1313-- (wpath.networks, [empty_file]),
1414- (wpath.sbin, ['scripts/wicd']),
1515- (wpath.daemon, ['wicd/monitor.py', 'wicd/wicd-daemon.py',
1616- 'wicd/suspend.py', 'wicd/autoconnect.py']),
1717-
-15
pkgs/tools/networking/wicd/pygtk.patch
···11-For some reason nix's pygtk doesn't have a pygtk module so we remove the version check.
22-If this ever changes we could remove this patch.
33-44---- wicd-1.7.0/gtk/wicd-client.py 2009-09-01 11:05:31.000000000 -0400
55-+++ wicd-1.7.0/gtk/wicd-client.py 2009-12-28 00:22:57.000000000 -0500
66-@@ -43,9 +43,6 @@
77- import atexit
88- from dbus import DBusException
99-1010--import pygtk
1111--pygtk.require('2.0')
1212--
1313- HAS_NOTIFY = True
1414- try:
1515- import pynotify