2013-05-27 10:10:19 +00:00
|
|
|
{ stdenv, fetchgit, pkgconfig, libuuid, openssl }:
|
|
|
|
|
2013-08-28 19:52:07 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2013-05-27 10:10:19 +00:00
|
|
|
version = "20130507";
|
|
|
|
checkout = "25/50225/2";
|
2013-08-28 19:52:07 +00:00
|
|
|
|
2013-05-27 10:10:19 +00:00
|
|
|
name = "vboot_reference-${version}";
|
|
|
|
|
|
|
|
src = fetchgit {
|
2015-09-01 09:09:18 +00:00
|
|
|
url = https://chromium.googlesource.com/chromiumos/platform/vboot_reference;
|
2013-05-27 10:10:19 +00:00
|
|
|
rev = "refs/changes/${checkout}";
|
|
|
|
sha256 = "00qhwhh5ygrcfm9is8hrk1spqdvfs6aa744h10jbr03zics5bvac";
|
|
|
|
};
|
|
|
|
|
2013-05-27 21:36:43 +00:00
|
|
|
buildInputs = [ pkgconfig openssl ] ++
|
|
|
|
(if libuuid == null
|
|
|
|
then []
|
|
|
|
else [ (stdenv.lib.overrideDerivation libuuid
|
|
|
|
(args: { configureFlags = args.configureFlags + " --enable-static"; })) ]);
|
2013-05-27 10:10:19 +00:00
|
|
|
|
2013-08-28 19:52:07 +00:00
|
|
|
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!";
|
|
|
|
|
2013-05-27 10:10:19 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-06-30 12:56:10 +00:00
|
|
|
mkdir -p $out/bin
|
2013-05-27 10:10:19 +00:00
|
|
|
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
|
|
|
|
'';
|
2013-08-28 19:52:07 +00:00
|
|
|
|
|
|
|
meta = {
|
2013-10-06 09:49:53 +00:00
|
|
|
description = "Chrome OS partitioning and kernel signing tools";
|
2013-08-28 19:52:07 +00:00
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
2013-05-27 10:10:19 +00:00
|
|
|
}
|