<commit_before>{ stdenv, fetchurl, autoreconfHook,
  gzip, bzip2, pkgconfig, flex, check,
  pam, coreutils
}:

stdenv.mkDerivation rec {
  name = "kbd-${version}";
  version = "2.0.4";

  src = fetchurl {
    url = "mirror://kernel/linux/utils/kbd/${name}.tar.xz";
    sha256 = "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz";
  };

  configureFlags = [
    "--enable-optional-progs"
    "--enable-libkeymap"
    "--disable-nls"
  ];

  patches = [ ./search-paths.patch ];

  postPatch =
    ''
      # Add Neo keymap subdirectory
      sed -i -e 's,^KEYMAPSUBDIRS *= *,&i386/neo ,' data/Makefile.am

      # Fix the path to gzip/bzip2.
      substituteInPlace src/libkeymap/findfile.c \
        --replace gzip ${gzip}/bin/gzip \
        --replace bzip2 ${bzip2.bin}/bin/bzip2 \

      # We get a warning in armv5tel-linux and the fuloong2f, so we
      # disable -Werror in it.<commit_msg>kbd: Rename some keymaps.<commit_after>{ stdenv, fetchurl, autoreconfHook,
  gzip, bzip2, pkgconfig, flex, check,
  pam, coreutils
}:

stdenv.mkDerivation rec {
  name = "kbd-${version}";
  version = "2.0.4";

  src = fetchurl {
    url = "mirror://kernel/linux/utils/kbd/${name}.tar.xz";
    sha256 = "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz";
  };

  configureFlags = [
    "--enable-optional-progs"
    "--enable-libkeymap"
    "--disable-nls"
  ];

  patches = [ ./search-paths.patch ];

  postPatch =
    ''
      # Add Neo keymap subdirectory
      sed -i -e 's,^KEYMAPSUBDIRS *= *,&i386/neo ,' data/Makefile.am

      # Renaming keymaps with name clashes, because loadkeys just picks
      # the first keymap it sees. The clashing names lead to e.g.
      # "loadkeys no" defaulting to a norwegian dvorak map instead of
      # the much more common qwerty one.
      pushd data/keymaps/i386
      mv qwertz/cz{,-qwertz}.map
      mv olpc/es{,-olpc}.map
      mv olpc/pt{,-olpc}.map
      mv dvorak/{no.map,dvorak-no.map}
      mv fgGIod/trf{,-fgGIod}.map
      mv colemak/{en-latin9,colemak}.map
      popd

      # Fix the path to gzip/bzip2.
      substituteInPlace src/libkeymap/findfile.c \
        --replace gzip ${gzip}/bin/gzip \
        --replace bzip2 ${bzip2.bin}/bin/bzip2 \

      # We get a warning in armv5tel-linux and the fuloong2f, so we
      # disable -Werror in it.
{'fraction_non_alphanumeric': 0.1372719374456994, 'fraction_numerical': 0.029539530842745437, 'mean_word_length': 2.5322085889570554, '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': '6068296', 'n_tokens_mistral': 944, 'n_tokens_neox': 896, 'n_words': 189}