nixpkgs/pkgs/tools/system/vboot_reference/default.nix
Alyssa Ross a8e63e4f74
treewide: fetchgit -> fetchFromGitiles
This is only the easy cases -- some fetchgit uses that point to
Gitiles instances are in generated code, where the generating code
would have to know in advance if it was fetching from Gitiles or not.
I don't think this is worth it.
2019-12-02 22:45:06 +00:00

48 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitiles, pkgconfig, libuuid, openssl, libyaml, lzma }:
stdenv.mkDerivation rec {
version = "20180311";
checkout = "4c84e077858c809ee80a9a6f9b38185cf7dcded7";
pname = "vboot_reference";
src = fetchFromGitiles {
url = "https://chromium.googlesource.com/chromiumos/platform/vboot_reference";
rev = checkout;
sha256 = "1zja4ma6flch08h5j2l1hqnxmw2xwylidnddxxd5y2x05dai9ddj";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ openssl libuuid libyaml lzma ];
enableParallelBuilding = true;
patches = [ ./dont_static_link.patch ];
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 stdenv.lib; {
description = "Chrome OS partitioning and kernel signing tools";
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = with maintainers; [ lheckemann ];
};
}