diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/system/vboot_reference/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/system/vboot_reference/default.nix | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/nixpkgs/pkgs/tools/system/vboot_reference/default.nix b/nixpkgs/pkgs/tools/system/vboot_reference/default.nix index 77e030eb086c..4718173e430d 100644 --- a/nixpkgs/pkgs/tools/system/vboot_reference/default.nix +++ b/nixpkgs/pkgs/tools/system/vboot_reference/default.nix @@ -1,38 +1,34 @@ { lib, stdenv, fetchFromGitiles, pkg-config, libuuid, openssl, libyaml, xz }: stdenv.mkDerivation rec { - version = "20180311"; - checkout = "4c84e077858c809ee80a9a6f9b38185cf7dcded7"; + version = "111.15329"; pname = "vboot_reference"; src = fetchFromGitiles { url = "https://chromium.googlesource.com/chromiumos/platform/vboot_reference"; - rev = checkout; - sha256 = "1zja4ma6flch08h5j2l1hqnxmw2xwylidnddxxd5y2x05dai9ddj"; + rev = "1a1cb5c9a38030a5868e2aaad295c68432c680fd"; # refs/heads/release-R111-15329.B + sha256 = "sha256-56/hqqFiKHw0/ah0D20U1ueIU2iq8I4Wn5DiEWxB9qA="; }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl libuuid libyaml xz ]; + buildInputs = [ libuuid libyaml openssl xz ]; enableParallelBuilding = true; - patches = [ ./dont_static_link.patch ]; - - NIX_CFLAGS_COMPILE = [ - # fix build with gcc9 - "-Wno-error" - # workaround build failure on -fno-common toolchains: - # ld: /build/source/build/futility/vb2_helper.o:(.bss+0x0): multiple definition of - # `vboot_version'; /build/source/build/futility/futility.o:(.bss+0x0): first defined here - # TODO: remove it when next release contains: - # https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/df4d2000a22db673a788b8e57e8e7c0cc3cee777 - "-fcommon" + env.NIX_CFLAGS_COMPILE = toString [ + # This apparently doesn't work as expected: + # - https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/refs/heads/release-R111-15329.B/Makefile#439 + # Let's apply the same flag manually. + "-Wno-error=deprecated-declarations" ]; postPatch = '' substituteInPlace Makefile \ --replace "ar qc" '${stdenv.cc.bintools.targetPrefix}ar qc' + # Drop flag unrecognized by GCC 9 (for e.g. aarch64-linux) + substituteInPlace Makefile \ + --replace "-Wno-unknown-warning" "" ''; preBuild = '' @@ -42,6 +38,13 @@ stdenv.mkDerivation rec { 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-R111-15329.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 = '' @@ -53,6 +56,6 @@ stdenv.mkDerivation rec { description = "Chrome OS partitioning and kernel signing tools"; license = licenses.bsd3; platforms = platforms.linux; - maintainers = with maintainers; [ lheckemann ]; + maintainers = with maintainers; [ lheckemann samueldr ]; }; } |