summary refs log tree commit diff
path: root/pkgs/tools/misc/nvramtool/default.nix
blob: ecff547e9513c3f41f106e5dbfc5ad79b618098f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, fetchgit, iasl, flex, bison }:

stdenv.mkDerivation rec {
  pname = "nvramtool";
  version = "4.8.1";

  src = fetchgit {
    url = "http://review.coreboot.org/p/coreboot";
    rev = "refs/tags/${version}";
    sha256 = "0nrf840jg4fn38zcnz1r10w2yfpvrk1nvsrnbbgdbgkmpjxz0zw9";
  };

  nativeBuildInputs = [ flex bison ];
  buildInputs = [ iasl ];

  buildPhase = ''
    export LEX=${flex}/bin/flex
    make -C util/nvramtool
    '';

  installPhase = ''
    mkdir -p $out/bin
    cp util/nvramtool/nvramtool $out/bin
    '';

  meta = with stdenv.lib; {
    description = "utility for reading/writing coreboot parameters and displaying information from the coreboot table in CMOS/NVRAM";
    homepage = https://www.coreboot.org/Nvramtool;
    license = licenses.gpl2;
    maintainers = [ maintainers.cryptix ];
    platforms = platforms.linux;
  };
}