<commit_before>{ stdenv, lib, makeWrapper, kdeEnv }:

drv:

{ targets, paths }:

let
  env = kdeEnv drv paths;
in
stdenv.mkDerivation {
  inherit (drv) name;

  drv = lib.getBin drv;
  inherit env targets;
  passthru = { unwrapped = drv; };

  nativeBuildInputs = [ makeWrapper ];

  unpackPhase = "true";
  configurePhase = "runHook preConfigure; runHook postConfigure";
  buildPhase = "true";

  installPhase = ''
    for t in $targets; do
        if [ -a "$drv/$t" ]; then
            makeWrapper "$drv/$t" "$out/$t" \
                --argv0 '"$0"' \
                --suffix PATH : "$out/bin:$env/bin" \
                --prefix XDG_CONFIG_DIRS : "$env/etc/xdg" \<commit_msg>kdeWrapper: assume empty path list by default<commit_after>{ stdenv, lib, makeWrapper, kdeEnv }:

drv:

{ targets, paths ? [] }:

let
  env = kdeEnv drv paths;
in
stdenv.mkDerivation {
  inherit (drv) name;

  drv = lib.getBin drv;
  inherit env targets;
  passthru = { unwrapped = drv; };

  nativeBuildInputs = [ makeWrapper ];

  unpackPhase = "true";
  configurePhase = "runHook preConfigure; runHook postConfigure";
  buildPhase = "true";

  installPhase = ''
    for t in $targets; do
        if [ -a "$drv/$t" ]; then
            makeWrapper "$drv/$t" "$out/$t" \
                --argv0 '"$0"' \
                --suffix PATH : "$out/bin:$env/bin" \
                --prefix XDG_CONFIG_DIRS : "$env/etc/xdg" \
{'fraction_non_alphanumeric': 0.1474588403722262, 'fraction_numerical': 0.002863278453829635, 'mean_word_length': 2.3686746987951808, 'pattern_counts': {'":': 0, '<': 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': '3831535', 'n_tokens_mistral': 512, 'n_tokens_neox': 476, 'n_words': 124}