about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/system/vboot_reference/default.nix
blob: 85baa3d3f30cc9f515857d60817d24a97b037830 (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
35
36
37
38
39
40
41
42
{ stdenv, fetchgit, pkgconfig, libuuid, openssl, libyaml, lzma }:

stdenv.mkDerivation rec {
  version = "20180311";
  checkout = "4c84e077858c809ee80a9a6f9b38185cf7dcded7";

  pname = "vboot_reference";

  src = fetchgit {
    url = https://chromium.googlesource.com/chromiumos/platform/vboot_reference;
    rev = "${checkout}";
    sha256 = "1zja4ma6flch08h5j2l1hqnxmw2xwylidnddxxd5y2x05dai9ddj";
  };

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ openssl libuuid libyaml lzma ];

  enableParallelBuilding = true;

  patches = [ ./dont_static_link.patch ];

  preBuild = ''
    patchShebangs scripts
  '';

  makeFlags = [
    "DESTDIR=$(out)"
    "HOST_ARCH=${stdenv.hostPlatform.parsed.cpu.name}"
  ];

  postInstall = ''
    mkdir -p $out/share/vboot
    cp -r tests/devkeys* $out/share/vboot/
  '';

  meta = with stdenv.lib; {
    description = "Chrome OS partitioning and kernel signing tools";
    license = licenses.bsd3;
    platforms = platforms.linux;
    maintainers = with maintainers; [ lheckemann ];
  };
}