lol
1{ stdenv, fetchgit, iasl, flex, bison }:
2
3stdenv.mkDerivation rec {
4 name = "cbfstool-${version}";
5 version = "git-2015-07-09";
6
7 src = fetchgit {
8 url = "http://review.coreboot.org/p/coreboot";
9 rev = "5d866213f42fd22aed80abb5a91d74f6d485ac3f";
10 sha256 = "1fki5670pmz1wb0yg0a0hb5cap78mgbvdhj8m2xly2kndwicg40p";
11 };
12
13 buildInputs = [ iasl flex bison ];
14
15 hardeningDisable = [ "fortify" ];
16
17 buildPhase = ''
18 export LEX=${flex}/bin/flex
19 make -C util/cbfstool
20 '';
21
22 installPhase = ''
23 mkdir -p $out/bin
24 cp util/cbfstool/cbfstool $out/bin
25 cp util/cbfstool/fmaptool $out/bin
26 cp util/cbfstool/rmodtool $out/bin
27 '';
28
29 meta = with stdenv.lib; {
30 description = "CBFS tool";
31 homepage = http://www.coreboot.org;
32 license = licenses.gpl2;
33 maintainers = [ maintainers.tstrobel ];
34 platforms = platforms.linux;
35 };
36}
37