<commit_before>{ stdenv
, fetchurl
, libarchive
}:

let
  version = "20160607";
  id = "26083";
in

stdenv.mkDerivation rec {
  name = "intel-microcode-${version}";

  src = fetchurl {
    url = "https://downloadmirror.intel.com/${id}/eng/microcode-${version}.tgz";
    sha256 = "db821eb47af2caa39613caee0eb89a9584b2ebc4a9ab1b9624fe778f9a41fa7d";
  };

  nativeBuildInputs = [
    libarchive
  ];

  sourceRoot = ".";

  postPatch =
    /* Some Intel Skylake CPUs with signature 0x406e3 have issues updating
       microcode. Remove for now...
       https://bugs.archlinux.org/task/49806 */ ''
      sed -i microcode.dat \
        -e "/mc0406e3/,/mc/d"
    '';

  buildPhase = ''
    gcc -O2 -Wall -o intel-microcode2ucode ${./intel-microcode2ucode.c}
    ./intel-microcode2ucode microcode.dat
  '';

  installPhase = ''
    install -D -m755 -v 'microcode.bin' 'kernel/x86/microcode/GenuineIntel.bin'
    mkdir -pv $out
    echo 'kernel/x86/microcode/GenuineIntel.bin' | \
      bsdcpio -o -H newc -R 0:0 > "$out/intel-ucode.img"
  '';

  meta = with stdenv.lib; {
    description = "Microcode for Intel processors";
    homepage = http://www.intel.com/;
    license = licenses.unfreeRedistributableFirmware;
    maintainers = with maintainers; [
      wkennington
    ];
    platforms = with platforms;
      x86_64-linux;
  };
}<commit_msg>intel-microcode: 2016-06-07 -> 2016-07-14<commit_after>{ stdenv
, fetchurl
, libarchive
}:

let
  version = "20160714";
  id = "26156";
in
stdenv.mkDerivation rec {
  name = "intel-microcode-${version}";

  src = fetchurl {
    url = "https://downloadmirror.intel.com/${id}/eng/microcode-${version}.tgz";
    sha256 = "f3a9c6fc93275bf1febc26f7c397ac93ed5f109e47fb52932f6dbd5cfdbc840e";
  };

  nativeBuildInputs = [
    libarchive
  ];

  sourceRoot = ".";

  buildPhase = ''
    gcc -O2 -Wall -o intel-microcode2ucode ${./intel-microcode2ucode.c}
    ./intel-microcode2ucode microcode.dat
  '';

  installPhase = ''
    install -D -m755 -v 'microcode.bin' 'kernel/x86/microcode/GenuineIntel.bin'
    mkdir -pv $out
    echo 'kernel/x86/microcode/GenuineIntel.bin' | \
      bsdcpio -o -H newc -R 0:0 > "$out/intel-ucode.img"
  '';

  meta = with stdenv.lib; {
    description = "Microcode for Intel processors";
    homepage = http://www.intel.com/;
    license = licenses.unfreeRedistributableFirmware;
    maintainers = with maintainers; [
      wkennington
    ];
    platforms = with platforms;
      x86_64-linux;
  };
}
{'fraction_non_alphanumeric': 0.14175779667881733, 'fraction_numerical': 0.06601863102470636, 'mean_word_length': 2.8897637795275593, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5616796', 'n_tokens_mistral': 1051, 'n_tokens_neox': 935, 'n_words': 165}