Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
66 lines
1.6 KiB
Nix
66 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitiles,
|
|
pkg-config,
|
|
libuuid,
|
|
openssl,
|
|
libyaml,
|
|
xz,
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "vboot_reference";
|
|
version = "135.16209";
|
|
|
|
src = fetchFromGitiles {
|
|
url = "https://chromium.googlesource.com/chromiumos/platform/vboot_reference";
|
|
rev = "bf4b21294a1c2c6b94f400819d3fce4a905b3afe"; # refs/heads/release-R135-16209.B
|
|
hash = "sha256-frg7NkK173wAHJRedtbJI5jI8Kee/VkByh5DCUzD9OA=";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [
|
|
libuuid
|
|
libyaml
|
|
openssl
|
|
xz
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
postPatch = ''
|
|
substituteInPlace Makefile \
|
|
--replace-fail "ar qc" '${stdenv.cc.bintools.targetPrefix}ar qc'
|
|
# Drop flag unrecognized by GCC 9 (for e.g. aarch64-linux)
|
|
substituteInPlace Makefile \
|
|
--replace-fail "-Wno-unknown-warning" ""
|
|
|
|
patchShebangs scripts
|
|
'';
|
|
|
|
makeFlags = [
|
|
"DESTDIR=$(out)"
|
|
"HOST_ARCH=${stdenv.hostPlatform.parsed.cpu.name}"
|
|
"USE_FLASHROM=0"
|
|
# Upstream has weird opinions about DESTDIR
|
|
# https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/refs/heads/release-R135-16209.B/Makefile#51
|
|
"UB_DIR=${placeholder "out"}/bin"
|
|
"UL_DIR=${placeholder "out"}/lib"
|
|
"UI_DIR=${placeholder "out"}/include/vboot"
|
|
"US_DIR=${placeholder "out"}/share/vboot"
|
|
];
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/share/vboot
|
|
cp -r tests/devkeys* $out/share/vboot/
|
|
'';
|
|
|
|
meta = {
|
|
description = "Chrome OS partitioning and kernel signing tools";
|
|
license = lib.licenses.bsd3;
|
|
platforms = lib.platforms.linux;
|
|
maintainers = [ lib.maintainers.jmbaur ];
|
|
};
|
|
}
|