mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 21:50:55 +00:00
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.
This commit is contained in:
parent
6f3ff5acc7
commit
e2b4644f9c
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue