diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2021-11-22 15:40:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-22 16:40:06 +0100 |
commit | cda036f189d6dfad27fae50db0e260466e8a2529 (patch) | |
tree | 07e8a34e4494792ff27845432d75286f321f14f3 /pkgs/development/compilers/edk2 | |
parent | dae20ac9effc3ad06b8e002b7033e90c1cf1f899 (diff) |
edk2: pull upstream brotli fix for gcc-11 (#144137)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/development/compilers/edk2')
-rw-r--r-- | pkgs/development/compilers/edk2/default.nix | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/pkgs/development/compilers/edk2/default.nix b/pkgs/development/compilers/edk2/default.nix index aaf59ca1ef57..b92a7b5d1910 100644 --- a/pkgs/development/compilers/edk2/default.nix +++ b/pkgs/development/compilers/edk2/default.nix @@ -1,15 +1,14 @@ -{ - stdenv, - clangStdenv, - fetchgit, - fetchpatch, - libuuid, - python3, - bc, - clang_9, - llvmPackages_9, - overrideCC, - lib, +{ stdenv +, clangStdenv +, fetchFromGitHub +, fetchpatch +, libuuid +, python3 +, bc +, clang_9 +, llvmPackages_9 +, overrideCC +, lib }: let @@ -39,12 +38,26 @@ edk2 = buildStdenv.mkDerivation { version = "202108"; # submodules - src = fetchgit { - url = "https://github.com/tianocore/edk2"; + src = fetchFromGitHub { + owner = "tianocore"; + repo = "edk2"; rev = "edk2-stable${edk2.version}"; + fetchSubmodules = true; sha256 = "1ps244f7y43afxxw6z95xscy24f9mpp8g0mfn90rd4229f193ba2"; }; + patches = [ + # Pull upstream fix for gcc-11 build. + (fetchpatch { + name = "gcc-11-vla.patch"; + url = "https://github.com/google/brotli/commit/0a3944c8c99b8d10cc4325f721b7c273d2b41f7b.patch"; + sha256 = "10c6ibnxh4f8lrh9i498nywgva32jxy2c1zzvr9mcqgblf9d19pj"; + # Apply submodule patch to subdirectory: "a/" -> "BaseTools/Source/C/BrotliCompress/brotli/" + stripLen = 1; + extraPrefix = "BaseTools/Source/C/BrotliCompress/brotli/"; + }) + ]; + buildInputs = [ libuuid pythonEnv ]; makeFlags = [ "-C BaseTools" ] |