This commit is contained in:
mjallen18
2026-01-22 13:54:03 -06:00
parent fde852b29b
commit fdaa34191c

View File

@@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
chmod -R u+w .
patchShebangs ./edk2
patchShebangs ./source
runHook postUnpack
'';
@@ -53,11 +53,11 @@ stdenv.mkDerivation rec {
postPatch = ''
# enable compilation using Clang
# https://bugzilla.tianocore.org/show_bug.cgi?id=4620
substituteInPlace edk2/BaseTools/Conf/tools_def.template --replace-fail \
substituteInPlace source/BaseTools/Conf/tools_def.template --replace-fail \
'DEFINE CLANGPDB_WARNING_OVERRIDES = ' \
'DEFINE CLANGPDB_WARNING_OVERRIDES = -Wno-unneeded-internal-declaration '
substituteInPlace edk2/BaseTools/Conf/tools_def.template \
substituteInPlace source/BaseTools/Conf/tools_def.template \
--replace "-Werror" "-Werror -Wno-error=format-security"
'';
@@ -65,15 +65,15 @@ stdenv.mkDerivation rec {
export PYTHON_COMMAND=${python3}/bin/python
export WORKSPACE=$PWD
make -C ./edk2/BaseTools
make -C ./source/BaseTools
'';
installPhase = ''
runHook preInstall
mkdir -vp $out
mv -v ./edk2/BaseTools $out
mv -v ./edk2/edksetup.sh $out
mv -v ./source/BaseTools $out
mv -v ./source/edksetup.sh $out
# patchShebangs fails to see these when cross compiling
for i in $out/BaseTools/BinWrappers/PosixLike/*; do
chmod +x "$i"