···27 (mkRemovedOptionModule [ "services" "mesos" ] "The corresponding package was removed from nixpkgs.")
28 (mkRemovedOptionModule [ "services" "winstone" ] "The corresponding package was removed from nixpkgs.")
29 (mkRemovedOptionModule [ "networking" "vpnc" ] "Use environment.etc.\"vpnc/service.conf\" instead.")
030 (mkRemovedOptionModule [ "environment" "blcr" "enable" ] "The BLCR module has been removed")
31 (mkRemovedOptionModule [ "services" "beegfsEnable" ] "The BeeGFS module has been removed")
32 (mkRemovedOptionModule [ "services" "beegfs" ] "The BeeGFS module has been removed")
···27 (mkRemovedOptionModule [ "services" "mesos" ] "The corresponding package was removed from nixpkgs.")
28 (mkRemovedOptionModule [ "services" "winstone" ] "The corresponding package was removed from nixpkgs.")
29 (mkRemovedOptionModule [ "networking" "vpnc" ] "Use environment.etc.\"vpnc/service.conf\" instead.")
30+ (mkRemovedOptionModule [ "networking" "wicd" ] "The corresponding package was removed from nixpkgs.")
31 (mkRemovedOptionModule [ "environment" "blcr" "enable" ] "The BLCR module has been removed")
32 (mkRemovedOptionModule [ "services" "beegfsEnable" ] "The BeeGFS module has been removed")
33 (mkRemovedOptionModule [ "services" "beegfs" ] "The BeeGFS module has been removed")
···1+{ stdenv, lib, fetchFromGitHub, makeWrapper
2+3+# --- Runtime Dependencies ---
4+, bash, procps, iproute2, dnsmasq, iptables
5+, coreutils, flock, gawk, getopt, gnugrep, gnused, which
6+# `nmcli` is not required for create_ap.
7+# Use NetworkManager by default because it is very likely already present
8+, useNetworkManager ? true
9+, networkmanager
10+11+# --- WiFi Hotspot Dependencies ---
12+, useWifiDependencies ? true
13+, hostapd, iw
14+# You only need this if 'iw' can not recognize your adapter.
15+, useWirelessTools ? true
16+, wirelesstools # for iwconfig
17+# To fall back to haveged if entropy is low.
18+# Defaulting to false because not having it does not break things.
19+# If it is really needed, warnings will be logged to journal.
20+, useHaveged ? false
21+, haveged
22+# You only need this if you wish to show WiFi QR codes in terminal
23+, useQrencode ? true
24+, qrencode
25+}:
26+27+stdenv.mkDerivation rec {
28+ pname = "linux-router";
29+ version = "0.6.2";
30+31+ src = fetchFromGitHub {
32+ owner = "garywill";
33+ repo = "linux-router";
34+ rev = "${version}";
35+ sha256 = "193bnlwmjxsk0cri6xdylf218qayldn02pdnppvbd39ls361776z";
36+ };
37+38+ nativeBuildInputs = [ makeWrapper ];
39+40+ dontBuild = true;
41+42+ installPhase = with lib; let
43+ binPath = makeBinPath ([ procps iproute2 getopt bash dnsmasq
44+ iptables coreutils which flock gnugrep gnused gawk ]
45+ ++ optional useNetworkManager networkmanager
46+ ++ optional useWifiDependencies hostapd
47+ ++ optional useWifiDependencies iw
48+ ++ optional (useWifiDependencies && useWirelessTools) wirelesstools
49+ ++ optional (useWifiDependencies && useHaveged) haveged
50+ ++ optional (useWifiDependencies && useQrencode) qrencode);
51+ in
52+ ''
53+ mkdir -p $out/bin/ $out/.bin-wrapped
54+ mv lnxrouter $out/.bin-wrapped/lnxrouter
55+ makeWrapper $out/.bin-wrapped/lnxrouter $out/bin/lnxrouter --prefix PATH : ${binPath}
56+ '';
57+58+ meta = with lib; {
59+ homepage = "https://github.com/garywill/linux-router";
60+ description = "Set Linux as router / Wifi hotspot / proxy in one command";
61+ longDescription = ''
62+ Features:
63+64+ - Create a NATed sub-network
65+ - Provide Internet
66+ - DHCP server and RA
67+ - DNS server
68+ - IPv6 (behind NATed LAN, like IPv4)
69+ - Creating Wifi hotspot:
70+ - Channel selecting
71+ - Choose encryptions: WPA2/WPA, WPA2, WPA, No encryption
72+ - Create AP on the same interface you are getting Internet (require same channel)
73+ - Transparent proxy (redsocks)
74+ - DNS proxy
75+ - Compatible with NetworkManager (automatically set interface as unmanaged)
76+ '';
77+ license = licenses.lgpl21;
78+ maintainers = with maintainers; [ x3ro ];
79+ platforms = platforms.linux;
80+ };
81+}
···1-The install tries to create files in /var. This patch removes those steps.
2-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-
···00000000000000000
-15
pkgs/tools/networking/wicd/pygtk.patch
···1-For some reason nix's pygtk doesn't have a pygtk module so we remove the version check.
2-If this ever changes we could remove this patch.
3-4---- wicd-1.7.0/gtk/wicd-client.py 2009-09-01 11:05:31.000000000 -0400
5-+++ wicd-1.7.0/gtk/wicd-client.py 2009-12-28 00:22:57.000000000 -0500
6-@@ -43,9 +43,6 @@
7- import atexit
8- from dbus import DBusException
9-10--import pygtk
11--pygtk.require('2.0')
12--
13- HAS_NOTIFY = True
14- try:
15- import pynotify