<commit_before>{stdenv, fetchurl, libX11, libXinerama, libXft, patches ? []}:

let
  name = "dwm-6.2";
in
stdenv.mkDerivation {
  inherit name;

  src = fetchurl {
    url = "https://dl.suckless.org/dwm/${name}.tar.gz";
    sha256 = "03hirnj8saxnsfqiszwl2ds7p0avg20izv9vdqyambks00p2x44p";
  };

  buildInputs = [ libX11 libXinerama libXft ];

  prePatch = ''sed -i "s@/usr/local@$out@" config.mk'';

  # Allow users set their own list of patches
  inherit patches;

  buildPhase = " make ";<commit_msg>dwm: add conf option Allow users to set their own config.def.h configuration file for dwm.<commit_after>{stdenv, fetchurl, libX11, libXinerama, libXft, writeText, patches ? [], conf ? null}:

with stdenv.lib;

let
  name = "dwm-6.2";
in
stdenv.mkDerivation {
  inherit name;

  src = fetchurl {
    url = "https://dl.suckless.org/dwm/${name}.tar.gz";
    sha256 = "03hirnj8saxnsfqiszwl2ds7p0avg20izv9vdqyambks00p2x44p";
  };

  buildInputs = [ libX11 libXinerama libXft ];

  prePatch = ''sed -i "s@/usr/local@$out@" config.mk'';

  # Allow users set their own list of patches
  inherit patches;

  # Allow users to set the config.def.h file containing the configuration
  postPatch = let configFile = if isDerivation conf || builtins.isPath conf then conf else writeText "config.def.h" conf;
  in optionalString (conf!=null) "cp ${configFile} config.def.h";

  buildPhase = " make ";
{'fraction_non_alphanumeric': 0.12987012987012986, 'fraction_numerical': 0.03318903318903319, 'mean_word_length': 3.9535714285714287, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '2006469', 'n_tokens_mistral': 551, 'n_tokens_neox': 520, 'n_words': 129}