Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 17.03 34 lines 980 B view raw
1{ stdenv, fetchurl, libarchive }: 2 3stdenv.mkDerivation rec { 4 name = "microcode-intel-${version}"; 5 version = "20161104"; 6 7 src = fetchurl { 8 url = "http://downloadmirror.intel.com/26400/eng/microcode-${version}.tgz"; 9 sha256 = "1lg3bvznvwcxf66k038c57brkcxfva8crpnzj5idmczr5yk4q5bh"; 10 }; 11 12 buildInputs = [ libarchive ]; 13 14 sourceRoot = "."; 15 16 buildPhase = '' 17 gcc -O2 -Wall -o intel-microcode2ucode ${./intel-microcode2ucode.c} 18 ./intel-microcode2ucode microcode.dat 19 ''; 20 21 installPhase = '' 22 mkdir -p $out kernel/x86/microcode 23 mv microcode.bin kernel/x86/microcode/GenuineIntel.bin 24 echo kernel/x86/microcode/GenuineIntel.bin | bsdcpio -o -H newc -R 0:0 > $out/intel-ucode.img 25 ''; 26 27 meta = with stdenv.lib; { 28 homepage = http://www.intel.com/; 29 description = "Microcode for Intel processors"; 30 license = licenses.unfreeRedistributableFirmware; 31 maintainers = with maintainers; [ wkennington ]; 32 platforms = platforms.linux; 33 }; 34}