···42 description = ''
43 The interfaces <command>wpa_supplicant</command> will use. If empty, it will
44 automatically use all wireless interfaces.
45- <warning><para>
46- The automatic discovery of interfaces does not work reliably on boot:
47- it may fail and leave the system without network. When possible, specify
48- a known interface name.
49- </para></warning>
50 '';
51 };
52···230 message = ''options networking.wireless."${name}".{psk,pskRaw,auth} are mutually exclusive'';
231 });
232233- warnings =
234- optional (cfg.interfaces == [] && config.systemd.services.wpa_supplicant.wantedBy != [])
235- ''
236- No network interfaces for wpa_supplicant have been configured: the service
237- may randomly fail to start at boot. You should specify at least one using the option
238- networking.wireless.interfaces.
239- '';
240-241 environment.systemPackages = [ package ];
242243 services.dbus.packages = [ package ];
···258 wantedBy = [ "multi-user.target" ];
259 stopIfChanged = false;
260261- path = [ package ];
262263 script = let
264 configStr = if cfg.allowAuxiliaryImperativeNetworks
265 then "-c /etc/wpa_supplicant.conf -I ${configFile}"
266 else "-c ${configFile}";
267 in ''
268- if [ -f /etc/wpa_supplicant.conf -a "/etc/wpa_supplicant.conf" != "${configFile}" ]
269- then echo >&2 "<3>/etc/wpa_supplicant.conf present but ignored. Generated ${configFile} is used instead."
270 fi
0271 iface_args="-s -u -D${cfg.driver} ${configStr}"
0272 ${if ifaces == [] then ''
273- for i in $(cd /sys/class/net && echo *); do
274- DEVTYPE=
275- UEVENT_PATH=/sys/class/net/$i/uevent
276- if [ -e "$UEVENT_PATH" ]; then
277- source "$UEVENT_PATH"
278- if [ "$DEVTYPE" = "wlan" -o -e /sys/class/net/$i/wireless ]; then
279- args+="''${args:+ -N} -i$i $iface_args"
280- fi
281- fi
000000000282 done
283 '' else ''
0284 args="${concatMapStringsSep " -N " (i: "-i${i} $iface_args") ifaces}"
285 ''}
00286 exec wpa_supplicant $args
287 '';
288 };
···42 description = ''
43 The interfaces <command>wpa_supplicant</command> will use. If empty, it will
44 automatically use all wireless interfaces.
0000045 '';
46 };
47···225 message = ''options networking.wireless."${name}".{psk,pskRaw,auth} are mutually exclusive'';
226 });
22700000000228 environment.systemPackages = [ package ];
229230 services.dbus.packages = [ package ];
···245 wantedBy = [ "multi-user.target" ];
246 stopIfChanged = false;
247248+ path = [ package pkgs.udev ];
249250 script = let
251 configStr = if cfg.allowAuxiliaryImperativeNetworks
252 then "-c /etc/wpa_supplicant.conf -I ${configFile}"
253 else "-c ${configFile}";
254 in ''
255+ if [ -f /etc/wpa_supplicant.conf -a "/etc/wpa_supplicant.conf" != "${configFile}" ]; then
256+ echo >&2 "<3>/etc/wpa_supplicant.conf present but ignored. Generated ${configFile} is used instead."
257 fi
258+259 iface_args="-s -u -D${cfg.driver} ${configStr}"
260+261 ${if ifaces == [] then ''
262+ # detect interfaces automatically
263+264+ # check if there are no wireless interface
265+ if ! find -H /sys/class/net/* -name wireless | grep -q .; then
266+ # if so, wait until one appears
267+ echo "Waiting for wireless interfaces"
268+ grep -q '^ACTION=add' < <(stdbuf -oL -- udevadm monitor -s net/wlan -pu)
269+ # Note: the above line has been carefully written:
270+ # 1. The process substitution avoids udevadm hanging (after grep has quit)
271+ # until it tries to write to the pipe again. Not even pipefail works here.
272+ # 2. stdbuf is needed because udevadm output is buffered by default and grep
273+ # may hang until more udev events enter the pipe.
274+ fi
275+276+ # add any interface found to the daemon arguments
277+ for name in $(find -H /sys/class/net/* -name wireless | cut -d/ -f 5); do
278+ echo "Adding interface $name"
279+ args+="''${args:+ -N} -i$name $iface_args"
280 done
281 '' else ''
282+ # add known interfaces to the daemon arguments
283 args="${concatMapStringsSep " -N " (i: "-i${i} $iface_args") ifaces}"
284 ''}
285+286+ # finally start daemon
287 exec wpa_supplicant $args
288 '';
289 };
+1-1
pkgs/applications/editors/vim/vimacs.nix
···45stdenv.mkDerivation rec {
6 pname = "vimacs";
7- version = vimPackage.version;
8 vimPackage = if useMacvim then macvim else vim_configurable;
910 buildInputs = [ vimPackage vimPlugins.vimacs ];
···45stdenv.mkDerivation rec {
6 pname = "vimacs";
7+ version = lib.getVersion vimPackage;
8 vimPackage = if useMacvim then macvim else vim_configurable;
910 buildInputs = [ vimPackage vimPlugins.vimacs ];
···75 chmod +x $out/bin/cryptpad
76 '';
7778+ meta = {
79+ longDescription = ''
80+ CryptPad is a collaboration suite that is end-to-end-encrypted and open-source.
81+ It is built to enable collaboration, synchronizing changes to documents in real time.
82+ Because all data is encrypted, the service and its administrators have no way of seeing the content being edited and stored.
83+ '';
84+ maintainers = with lib.maintainers; [ davhau ];
85+ mainProgram = "cryptpad";
86+ };
8788 };
89in