From 14912ca0b1814c71568d882601eaf51a47d1c1d6 Mon Sep 17 00:00:00 2001 From: Gergely Risko Date: Wed, 28 Aug 2013 21:52:07 +0200 Subject: [PATCH] vboot_reference: add meta attributes and cleanups --- pkgs/tools/system/vboot_reference/default.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/system/vboot_reference/default.nix b/pkgs/tools/system/vboot_reference/default.nix index 4c3c58b35cd..ed48a9976d4 100644 --- a/pkgs/tools/system/vboot_reference/default.nix +++ b/pkgs/tools/system/vboot_reference/default.nix @@ -1,13 +1,9 @@ { stdenv, fetchgit, pkgconfig, libuuid, openssl }: -let - 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!"; - +stdenv.mkDerivation rec { version = "20130507"; checkout = "25/50225/2"; -in stdenv.mkDerivation { + name = "vboot_reference-${version}"; src = fetchgit { @@ -22,6 +18,10 @@ in stdenv.mkDerivation { else [ (stdenv.lib.overrideDerivation libuuid (args: { configureFlags = args.configureFlags + " --enable-static"; })) ]); + 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!"; + buildPhase = '' make ARCH=${arch} `pwd`/build/cgpt/cgpt make ARCH=${arch} `pwd`/build/utility/vbutil_kernel @@ -38,4 +38,10 @@ in stdenv.mkDerivation { cp build/utility/vbutil_keyblock $out/bin cp build/utility/vbutil_firmware $out/bin ''; + + meta = { + description = "Chrome OS partitioning and kernel signing tools."; + license = stdenv.lib.licenses.bsd3; + platforms = stdenv.lib.platforms.linux; + }; }