2019-12-02 22:29:40 +00:00
|
|
|
{ stdenv, fetchFromGitiles, pkgconfig, libuuid, openssl, libyaml, lzma }:
|
2013-05-27 11:10:19 +01:00
|
|
|
|
2013-08-28 20:52:07 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2018-03-15 17:29:45 +00:00
|
|
|
version = "20180311";
|
|
|
|
checkout = "4c84e077858c809ee80a9a6f9b38185cf7dcded7";
|
2013-08-28 20:52:07 +01:00
|
|
|
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "vboot_reference";
|
2013-05-27 11:10:19 +01:00
|
|
|
|
2019-12-02 22:29:40 +00:00
|
|
|
src = fetchFromGitiles {
|
|
|
|
url = "https://chromium.googlesource.com/chromiumos/platform/vboot_reference";
|
2019-09-09 00:38:31 +01:00
|
|
|
rev = checkout;
|
2018-03-15 17:29:45 +00:00
|
|
|
sha256 = "1zja4ma6flch08h5j2l1hqnxmw2xwylidnddxxd5y2x05dai9ddj";
|
2013-05-27 11:10:19 +01:00
|
|
|
};
|
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2017-10-31 11:57:34 +00:00
|
|
|
buildInputs = [ openssl libuuid libyaml lzma ];
|
2013-05-27 11:10:19 +01:00
|
|
|
|
2017-10-31 11:57:34 +00:00
|
|
|
enableParallelBuilding = true;
|
2013-08-28 20:52:07 +01:00
|
|
|
|
2017-11-07 05:34:44 +00:00
|
|
|
patches = [ ./dont_static_link.patch ];
|
|
|
|
|
2019-11-03 00:05:04 +00:00
|
|
|
# fix build with gcc9
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-Wno-error" ];
|
|
|
|
|
2019-09-18 20:11:21 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "ar qc" '${stdenv.cc.bintools.targetPrefix}ar qc'
|
|
|
|
'';
|
|
|
|
|
2017-11-07 05:34:44 +00:00
|
|
|
preBuild = ''
|
2017-10-31 11:57:34 +00:00
|
|
|
patchShebangs scripts
|
2013-05-27 11:10:19 +01:00
|
|
|
'';
|
|
|
|
|
2017-11-07 05:34:44 +00:00
|
|
|
makeFlags = [
|
|
|
|
"DESTDIR=$(out)"
|
2018-02-27 12:48:39 +00:00
|
|
|
"HOST_ARCH=${stdenv.hostPlatform.parsed.cpu.name}"
|
2017-11-07 05:34:44 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
2017-10-31 11:57:34 +00:00
|
|
|
mkdir -p $out/share/vboot
|
|
|
|
cp -r tests/devkeys* $out/share/vboot/
|
2013-05-27 11:10:19 +01:00
|
|
|
'';
|
2013-08-28 20:52:07 +01:00
|
|
|
|
2018-02-27 12:48:54 +00:00
|
|
|
meta = with stdenv.lib; {
|
2013-10-06 10:49:53 +01:00
|
|
|
description = "Chrome OS partitioning and kernel signing tools";
|
2018-02-27 12:48:54 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ lheckemann ];
|
2013-08-28 20:52:07 +01:00
|
|
|
};
|
2013-05-27 11:10:19 +01:00
|
|
|
}
|