From e2b4644f9c30a8e08e140a8fb7ff3adec3d23c9e Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Fri, 7 Sep 2018 18:29:07 +0200 Subject: [PATCH] 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. --- pkgs/applications/networking/irc/weechat/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/irc/weechat/default.nix b/pkgs/applications/networking/irc/weechat/default.nix index eaf7410a3171..a9de275559db 100644 --- a/pkgs/applications/networking/irc/weechat/default.nix +++ b/pkgs/applications/networking/irc/weechat/default.nix @@ -133,13 +133,13 @@ in if configure == null then weechat else scripts = builtins.concatStringsSep ";" (lib.foldl (scripts: drv: scripts ++ mkScript drv) [ ] (config.scripts or [])); - in "${scripts}\n${init}"; + in "${scripts};${init}"; mkWeechat = bin: (writeScriptBin bin '' #!${stdenv.shell} export WEECHAT_EXTRA_LIBDIR=${pluginsDir} ${lib.concatMapStringsSep "\n" (p: lib.optionalString (p ? extraEnv) p.extraEnv) plugins} - exec ${weechat}/bin/${bin} "$@" --run-command "${init}" + exec ${weechat}/bin/${bin} "$@" --run-command ${lib.escapeShellArg init} '') // { inherit (weechat) name meta; unwrapped = weechat;