nixpkgs/pkgs/tools/system/vboot_reference/default.nix

51 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitiles, pkg-config, libuuid, openssl, libyaml, lzma }:
stdenv.mkDerivation rec {
2018-03-15 17:29:45 +00:00
version = "20180311";
checkout = "4c84e077858c809ee80a9a6f9b38185cf7dcded7";
pname = "vboot_reference";
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";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl libuuid libyaml lzma ];
enableParallelBuilding = true;
patches = [ ./dont_static_link.patch ];
2019-11-03 00:05:04 +00:00
# fix build with gcc9
NIX_CFLAGS_COMPILE = [ "-Wno-error" ];
postPatch = ''
substituteInPlace Makefile \
--replace "ar qc" '${stdenv.cc.bintools.targetPrefix}ar qc'
'';
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 lib; {
description = "Chrome OS partitioning and kernel signing tools";
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = with maintainers; [ lheckemann ];
};
}