nixpkgs/pkgs/os-specific/linux/microcode/intel.nix
Andreas Rammhold 89fab17749
microcodeIntel: 20170707 -> 20171117
From the changelog:

```
Intel Processor Microcode Package for Linux
20171117 Release

-- New Platforms --
CFL U0 (06-9e-0a:22) 70
CFL B0 (06-9e-0b:2) 72
SKX H0 (06-55-04:b7) 2000035
GLK B0 (06-7a-01:1) 1e
APL Bx (06-5c-09:3) 2c
-- Updates --
KBL Y0 (06-8e-0a:c0) 66->70
-- Removed files --
SKX H0 (06-55-04:97) 2000022
```
2017-11-21 17:17:49 +01:00

35 lines
981 B
Nix

{ stdenv, fetchurl, libarchive }:
stdenv.mkDerivation rec {
name = "microcode-intel-${version}";
version = "20171117";
src = fetchurl {
url = "https://downloadmirror.intel.com/27337/eng/microcode-${version}.tgz";
sha256 = "1p14ypbg28bdkbza6dx6dpjrdr5p13vmgrh2cw0y1v2qzalivgck";
};
buildInputs = [ libarchive ];
sourceRoot = ".";
buildPhase = ''
gcc -O2 -Wall -o intel-microcode2ucode ${./intel-microcode2ucode.c}
./intel-microcode2ucode microcode.dat
'';
installPhase = ''
mkdir -p $out kernel/x86/microcode
mv microcode.bin kernel/x86/microcode/GenuineIntel.bin
echo kernel/x86/microcode/GenuineIntel.bin | bsdcpio -o -H newc -R 0:0 > $out/intel-ucode.img
'';
meta = with stdenv.lib; {
homepage = http://www.intel.com/;
description = "Microcode for Intel processors";
license = licenses.unfreeRedistributableFirmware;
maintainers = with maintainers; [ wkennington ];
platforms = platforms.linux;
};
}