<commit_before>{ symlinkJoin, lib, makeWrapper, vdr
, plugins ? []
}: let

  makeXinePluginPath = l: lib.concatStringsSep ":" (map (p: "${p}/lib/xine/plugins") l);

  requiredXinePlugins = lib.flatten (map (p: p.passthru.requiredXinePlugins or []) plugins);

in symlinkJoin {

  name = "vdr-with-plugins-${lib.getVersion vdr}";

  paths = [ vdr ] ++ plugins;

  nativeBuildInputs = [ makeWrapper ];

  postBuild = ''
    wrapProgram $out/bin/vdr \
      --add-flags "-L $out/lib/vdr --localedir=$out/share/locale" \
      --prefix XINE_PLUGIN_PATH ":" ${makeXinePluginPath requiredXinePlugins}
  '';

  meta = with vdr.meta; {
    inherit license homepage;
    description = description
    + " (with plugins: "
    + lib.concatStringsSep ", " (map (x: ""+x.name) plugins)
    + ")";
  };
}<commit_msg>vdr: fix wrapper arguments escaping<commit_after>{ symlinkJoin, lib, makeWrapper, vdr
, plugins ? []
}: let

  makeXinePluginPath = l: lib.concatStringsSep ":" (map (p: "${p}/lib/xine/plugins") l);

  requiredXinePlugins = lib.flatten (map (p: p.passthru.requiredXinePlugins or []) plugins);

in symlinkJoin {

  name = "vdr-with-plugins-${lib.getVersion vdr}";

  paths = [ vdr ] ++ plugins;

  nativeBuildInputs = [ makeWrapper ];

  postBuild = ''
    wrapProgram $out/bin/vdr \
      --add-flags "-L $out/lib/vdr --localedir=$out/share/locale" \
      --prefix XINE_PLUGIN_PATH ":" ${lib.escapeShellArg (makeXinePluginPath requiredXinePlugins)}
  '';

  meta = with vdr.meta; {
    inherit license homepage;
    description = description
    + " (with plugins: "
    + lib.concatStringsSep ", " (map (x: ""+x.name) plugins)
    + ")";
  };
}
{'fraction_non_alphanumeric': 0.16514875531268974, 'fraction_numerical': 0.0, 'mean_word_length': 3.3946666666666667, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '917985', 'n_tokens_mistral': 594, 'n_tokens_neox': 583, 'n_words': 119}