Merge pull request #252983 from RaitoBezarius/update/edk2

authored by Ryan Lahfa and committed by GitHub fc8f7c74 bc88e90b

+16 -5
+16 -5
pkgs/development/compilers/edk2/default.nix
··· 2 , clangStdenv 3 , fetchFromGitHub 4 , fetchpatch 5 , libuuid 6 , python3 7 , bc ··· 28 else 29 "GCC5"; 30 31 - edk2 = stdenv.mkDerivation { 32 pname = "edk2"; 33 - version = "202305"; 34 35 patches = [ 36 # pass targetPrefix as an env var ··· 40 }) 41 ]; 42 43 - # submodules 44 - src = fetchFromGitHub { 45 owner = "tianocore"; 46 repo = "edk2"; 47 rev = "edk2-stable${edk2.version}"; 48 fetchSubmodules = true; 49 - hash = "sha256-htOvV43Hw5K05g0SF3po69HncLyma3BtgpqYSdzRG4s="; 50 }; 51 52 nativeBuildInputs = [ pythonEnv ]; 53 depsBuildBuild = [ buildPackages.stdenv.cc buildPackages.util-linux buildPackages.bash ]; 54 strictDeps = true; ··· 69 # patchShebangs fails to see these when cross compiling 70 for i in $out/BaseTools/BinWrappers/PosixLike/*; do 71 substituteInPlace $i --replace '/usr/bin/env bash' ${buildPackages.bash}/bin/bash 72 done 73 ''; 74
··· 2 , clangStdenv 3 , fetchFromGitHub 4 , fetchpatch 5 + , runCommand 6 , libuuid 7 , python3 8 , bc ··· 29 else 30 "GCC5"; 31 32 + edk2 = stdenv.mkDerivation rec { 33 pname = "edk2"; 34 + version = "202308"; 35 36 patches = [ 37 # pass targetPrefix as an env var ··· 41 }) 42 ]; 43 44 + srcWithVendoring = fetchFromGitHub { 45 owner = "tianocore"; 46 repo = "edk2"; 47 rev = "edk2-stable${edk2.version}"; 48 fetchSubmodules = true; 49 + hash = "sha256-Eoi1xf/hw/Knr7n0f0rgVof7wTgrHkmvV4eJjJV1NhM="; 50 }; 51 52 + # We don't want EDK2 to keep track of OpenSSL, 53 + # they're frankly bad at it. 54 + src = runCommand "edk2-unvendored-src" { } '' 55 + cp --no-preserve=mode -r ${srcWithVendoring} $out 56 + rm -rf $out/CryptoPkg/Library/OpensslLib/openssl 57 + mkdir -p $out/CryptoPkg/Library/OpensslLib/openssl 58 + tar --strip-components=1 -xf ${buildPackages.openssl.src} -C $out/CryptoPkg/Library/OpensslLib/openssl 59 + chmod -R +w $out/ 60 + ''; 61 + 62 nativeBuildInputs = [ pythonEnv ]; 63 depsBuildBuild = [ buildPackages.stdenv.cc buildPackages.util-linux buildPackages.bash ]; 64 strictDeps = true; ··· 79 # patchShebangs fails to see these when cross compiling 80 for i in $out/BaseTools/BinWrappers/PosixLike/*; do 81 substituteInPlace $i --replace '/usr/bin/env bash' ${buildPackages.bash}/bin/bash 82 + chmod +x "$i" 83 done 84 ''; 85