summaryrefslogtreecommitdiffstats
path: root/pkgs/development/compilers/edk2
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2024-02-08 15:08:52 +0000
committerSergei Trofimovich <slyich@gmail.com>2024-02-08 15:35:02 +0000
commit7b01dd0370f6ad1b35d2197baad8ba99a33567b0 (patch)
tree3d66d926931de43d2fdca1c818846dbc897bdde4 /pkgs/development/compilers/edk2
parent6556cc0f76bbf14ed87b80b824becaa6e1302a14 (diff)
OVMF: fix buils against `openssl-3.0.13`
Without the change the build fails on `staging-next` as https://hydra.nixos.org/build/248863953/nixlog/2/tail: /build/edk2-unvendored-src/CryptoPkg/Library/OpensslLib/openssl/crypto/property/property_parse.c:107:19: error: ‘INT64_MAX’ undeclared (first use in this function) 107 | if (v > ((INT64_MAX - (*s - '0')) / 10)) { | ^~~~~~~~~ The unbundled version of `openssl` `nixpkgs` injects into `edk2` started using `INT64_MAX` that `edk2`'s `<stdint.h>` does not provide and relies on `openssl` to define as a fallback. Let's pull in `openssl`'s own definition of those.
Diffstat (limited to 'pkgs/development/compilers/edk2')
-rw-r--r--pkgs/development/compilers/edk2/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/development/compilers/edk2/default.nix b/pkgs/development/compilers/edk2/default.nix
index 70afb8ba714b..4cfe823e59d9 100644
--- a/pkgs/development/compilers/edk2/default.nix
+++ b/pkgs/development/compilers/edk2/default.nix
@@ -59,6 +59,11 @@ edk2 = stdenv.mkDerivation rec {
mkdir -p $out/CryptoPkg/Library/OpensslLib/openssl
tar --strip-components=1 -xf ${buildPackages.openssl.src} -C $out/CryptoPkg/Library/OpensslLib/openssl
chmod -R +w $out/
+
+ # Fix missing INT64_MAX include that edk2 explicitly does not provide
+ # via it's own <stdint.h>. Let's pull in openssl's definition instead:
+ sed -i $out/CryptoPkg/Library/OpensslLib/openssl/crypto/property/property_parse.c \
+ -e '1i #include "internal/numbers.h"'
'';
nativeBuildInputs = [ pythonEnv ];