git.iko.soy/typeable/nixpkgs
on master help sign in
weechat: fix quoting for ${} syntax

In my previous PR I missed that ${sec.foobar} (syntax to retrieve secrets in a weechat runtime) breaks the shell evaluation. Furthermore `;` shall be used rather than `\n` to concat scripts and the init config.

commite2b4644f9c30a8e08e140a8fb7ff3adec3d23c9e authorMaximilian Bosch <maximilian@mbosch.me> dateFri 7 Sep 2018, 18:29 (8 years ago) parent6f3ff5a
1 file changed+2−2
pkgs/applications/networking/irc/weechat/default.nix+2−2
pkgs/applications/networking/irc/weechat/default.nix+2−2
@@ -133,13 +133,13 @@ in if configure == null then weechat else
133133
134134 scripts = builtins.concatStringsSep ";" (lib.foldl (scripts: drv: scripts ++ mkScript drv)
135135 [ ] (config.scripts or []));
136− in "${scripts}\n${init}";
136+ in "${scripts};${init}";
137137
138138 mkWeechat = bin: (writeScriptBin bin ''
139139 #!${stdenv.shell}
140140 export WEECHAT_EXTRA_LIBDIR=${pluginsDir}
141141 ${lib.concatMapStringsSep "\n" (p: lib.optionalString (p ? extraEnv) p.extraEnv) plugins}
142− exec ${weechat}/bin/${bin} "$@" --run-command "${init}"
142+ exec ${weechat}/bin/${bin} "$@" --run-command ${lib.escapeShellArg init}
143143 '') // {
144144 inherit (weechat) name meta;
145145 unwrapped = weechat;