2019-03-26 21:24:46 -07:00
|
|
|
{ stdenv, fetchFromGitHub, libarchive, iucode-tool }:
|
2012-02-01 14:05:21 -08:00
|
|
|
|
2015-03-25 11:39:58 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2019-03-26 21:24:46 -07:00
|
|
|
pname = "microcode-intel";
|
2020-06-09 14:40:29 -07:00
|
|
|
version = "20200609";
|
2019-03-26 21:24:46 -07:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "intel";
|
|
|
|
repo = "Intel-Linux-Processor-Microcode-Data-Files";
|
|
|
|
rev = "microcode-${version}";
|
2020-06-09 14:40:29 -07:00
|
|
|
sha256 = "0vzsv0fqp44dhmvj6syjjab3cs1bc4r0g7g97lna8l91vj2yin9j";
|
2012-02-01 14:05:21 -08:00
|
|
|
};
|
|
|
|
|
2018-08-15 23:11:50 -07:00
|
|
|
nativeBuildInputs = [ iucode-tool libarchive ];
|
2013-09-04 05:22:24 -07:00
|
|
|
|
2012-02-01 14:05:21 -08:00
|
|
|
installPhase = ''
|
2018-08-15 23:11:50 -07:00
|
|
|
runHook preInstall
|
|
|
|
|
2015-03-25 11:39:58 -07:00
|
|
|
mkdir -p $out kernel/x86/microcode
|
2018-08-15 23:11:50 -07:00
|
|
|
iucode_tool -w kernel/x86/microcode/GenuineIntel.bin intel-ucode/
|
2015-03-25 11:39:58 -07:00
|
|
|
echo kernel/x86/microcode/GenuineIntel.bin | bsdcpio -o -H newc -R 0:0 > $out/intel-ucode.img
|
2018-08-15 23:11:50 -07:00
|
|
|
|
|
|
|
runHook postInstall
|
2012-02-01 14:05:21 -08:00
|
|
|
'';
|
|
|
|
|
2015-03-25 11:39:58 -07:00
|
|
|
meta = with stdenv.lib; {
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "http://www.intel.com/";
|
2012-02-01 14:05:21 -08:00
|
|
|
description = "Microcode for Intel processors";
|
2015-03-25 14:28:32 -07:00
|
|
|
license = licenses.unfreeRedistributableFirmware;
|
2015-03-25 11:39:58 -07:00
|
|
|
platforms = platforms.linux;
|
2019-11-27 07:23:16 -08:00
|
|
|
maintainers = with maintainers; [ andir ];
|
2012-02-01 14:05:21 -08:00
|
|
|
};
|
2012-08-11 11:10:06 -07:00
|
|
|
}
|