3
0
Fork 0
forked from mirrors/nixpkgs

vboot_reference: Update

In addition to updating to a more recent upstream version, this
installs the development signing keys and removes the separate
vbutil_* tools in favour of the single futility tool.
This commit is contained in:
Linus Heckemann 2017-10-31 12:57:34 +01:00
parent 4d7c34fb33
commit 454c42c849

View file

@ -1,42 +1,35 @@
{ stdenv, fetchgit, pkgconfig, libuuid, openssl }:
{ stdenv, fetchgit, pkgconfig, libuuid, openssl, libyaml, lzma }:
stdenv.mkDerivation rec {
version = "20130507";
checkout = "25/50225/2";
version = "20171023";
checkout = "8122e0b8b13794";
name = "vboot_reference-${version}";
src = fetchgit {
url = https://chromium.googlesource.com/chromiumos/platform/vboot_reference;
rev = "refs/changes/${checkout}";
sha256 = "14d3a93ha5k4al4ib43nyn1ppx7kgb12xw6mkflhx8nxmx8827nc";
rev = "${checkout}";
sha256 = "0qxm3qlvm2fgjrn9b3n8rdccw2f5pdi7z542m2hdfddflx7jz1w7";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ openssl stdenv.cc.libc.static ]
++ stdenv.lib.optional (libuuid != null)
(libuuid.overrideAttrs (attrs:
{ configureFlags = attrs.configureFlags ++ [ "--enable-static" ]; }));
buildInputs = [ openssl libuuid libyaml lzma ];
arch = if stdenv.system == "x86_64-linux" then "x86_64"
else if stdenv.system == "i686-linux" then "x86"
else throw "vboot_reference for: ${stdenv.system} not supported!";
enableParallelBuilding = true;
buildPhase = ''
make ARCH=${arch} `pwd`/build/cgpt/cgpt
make ARCH=${arch} `pwd`/build/utility/vbutil_kernel
make ARCH=${arch} `pwd`/build/utility/vbutil_key
make ARCH=${arch} `pwd`/build/utility/vbutil_keyblock
make ARCH=${arch} `pwd`/build/utility/vbutil_firmware
patchShebangs scripts
make -j''${NIX_BUILD_CORES:-1} \
`pwd`/build/cgpt/cgpt \
`pwd`/build/futility/futility
'';
installPhase = ''
mkdir -p $out/bin
cp build/cgpt/cgpt $out/bin
cp build/utility/vbutil_kernel $out/bin
cp build/utility/vbutil_key $out/bin
cp build/utility/vbutil_keyblock $out/bin
cp build/utility/vbutil_firmware $out/bin
cp build/futility/futility $out/bin
mkdir -p $out/share/vboot
cp -r tests/devkeys* $out/share/vboot/
'';
meta = {