2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
libarchive,
|
|
|
|
iucode-tool,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "microcode-intel";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "20240910";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "intel";
|
|
|
|
repo = "Intel-Linux-Processor-Microcode-Data-Files";
|
|
|
|
rev = "microcode-${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-cn0qK81dwbamh5PBlPuC9KtDWyT2NwSxDD0XlCRAv6s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
iucode-tool
|
|
|
|
libarchive
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out kernel/x86/microcode
|
|
|
|
iucode_tool -w kernel/x86/microcode/GenuineIntel.bin intel-ucode/
|
2022-04-15 01:41:22 +00:00
|
|
|
touch -d @$SOURCE_DATE_EPOCH kernel/x86/microcode/GenuineIntel.bin
|
|
|
|
echo kernel/x86/microcode/GenuineIntel.bin | bsdtar --uid 0 --gid 0 -cnf - -T - | bsdtar --null -cf - --format=newc @- > $out/intel-ucode.img
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-11-16 04:20:00 +00:00
|
|
|
homepage = "https://www.intel.com/";
|
|
|
|
changelog = "https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/releases/tag/${src.rev}";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Microcode for Intel processors";
|
|
|
|
license = licenses.unfreeRedistributableFirmware;
|
2024-09-19 14:19:46 +00:00
|
|
|
platforms = [
|
|
|
|
"i686-linux"
|
|
|
|
"x86_64-linux"
|
|
|
|
];
|
|
|
|
maintainers = with maintainers; [ felixsinger ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|