nixpkgs/pkgs/os-specific/linux/microcode/intel.nix

35 lines
980 B
Nix
Raw Normal View History

{ stdenv, fetchurl, libarchive }:
stdenv.mkDerivation rec {
name = "microcode-intel-${version}";
2017-01-30 10:35:51 +00:00
version = "20161104";
2013-09-04 12:07:58 +00:00
src = fetchurl {
2017-01-30 10:35:51 +00:00
url = "http://downloadmirror.intel.com/26400/eng/microcode-${version}.tgz";
sha256 = "1lg3bvznvwcxf66k038c57brkcxfva8crpnzj5idmczr5yk4q5bh";
};
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";
2015-03-25 21:28:32 +00:00
license = licenses.unfreeRedistributableFirmware;
maintainers = with maintainers; [ wkennington ];
platforms = platforms.linux;
};
2012-08-11 18:10:06 +00:00
}