2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, libarchive, iucode-tool }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "microcode-intel";
|
2021-02-17 17:02:09 +00:00
|
|
|
version = "20210216";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "intel";
|
|
|
|
repo = "Intel-Linux-Processor-Microcode-Data-Files";
|
|
|
|
rev = "microcode-${version}";
|
2021-02-17 17:02:09 +00:00
|
|
|
sha256 = "17wrfp7h7xbvncgm1fp103zkyz9n1f820jy6yca1aq208264hjkv";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ iucode-tool libarchive ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out kernel/x86/microcode
|
|
|
|
iucode_tool -w kernel/x86/microcode/GenuineIntel.bin intel-ucode/
|
|
|
|
echo kernel/x86/microcode/GenuineIntel.bin | bsdcpio -o -H newc -R 0:0 > $out/intel-ucode.img
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.intel.com/";
|
|
|
|
description = "Microcode for Intel processors";
|
|
|
|
license = licenses.unfreeRedistributableFirmware;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ andir ];
|
|
|
|
};
|
|
|
|
}
|