diff --git a/pkgs/by-name/ed/edk2/package.nix b/pkgs/by-name/ed/edk2/package.nix index e986e42bd47aa..88cdcd0ce7bb0 100644 --- a/pkgs/by-name/ed/edk2/package.nix +++ b/pkgs/by-name/ed/edk2/package.nix @@ -41,8 +41,19 @@ edk2 = stdenv.mkDerivation { owner = "tianocore"; repo = "edk2"; rev = "edk2-stable${edk2.version}"; - fetchSubmodules = true; hash = "sha256-2odaTqiAZD5xduT0dwIYWj3gY/aFPVsTFbblIsEhBiA="; + + # Original submodule sources are no longer available, so the submodules are fetched manually, + # with unavailable sources replaced by mirrors. (https://github.com/tianocore/edk2/pull/6402) + fetchSubmodules = edk2.version != "202408"; + postFetch = + lib.optionalString (edk2.version == "202408") lib.pipe (import ./submodules-202408.nix) + [ + (lib.mapAttrsToList ( + path: src: "cp -r -T ${fetchFromGitHub (src // { fetchSubmodules = true; })} $out/${path}" + )) + lib.concatLines + ]; }; src = applyPatches { diff --git a/pkgs/by-name/ed/edk2/submodules-202408.nix b/pkgs/by-name/ed/edk2/submodules-202408.nix new file mode 100644 index 0000000000000..e977d9afaf829 --- /dev/null +++ b/pkgs/by-name/ed/edk2/submodules-202408.nix @@ -0,0 +1,80 @@ +{ + "CryptoPkg/Library/OpensslLib/openssl" = { + owner = "openssl"; + repo = "openssl"; + rev = "de90e54bbe82e5be4fb9608b6f5c308bb837d355"; + hash = "sha256-gpnSNaqwcA9bw1FWSrQpiTwkBL9ba0C4E7aQW1ExXTI="; + }; + "ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3" = { + owner = "ucb-bar"; + repo = "berkeley-softfloat-3"; + rev = "b64af41c3276f97f0e181920400ee056b9c88037"; + hash = "sha256-Yflpx+mjU8mD5biClNpdmon24EHg4aWBZszbOur5VEA="; + }; + "UnitTestFrameworkPkg/Library/CmockaLib/cmocka" = { + owner = "tianocore"; + repo = "edk2-cmocka"; + rev = "1cc9cde3448cdd2e000886a26acf1caac2db7cf1"; + hash = "sha256-AEOG82bFVSl+BMYf0jdmPBiAHSUAN7XeEC9vWfkBgu8="; + }; + "MdeModulePkg/Universal/RegularExpressionDxe/oniguruma" = { + owner = "kkos"; + repo = "oniguruma"; + rev = "abfc8ff81df4067f309032467785e06975678f0d"; + hash = "sha256-rNT+d8mQM76F3i/BsLdZJUQ5IlMU1bLkeS/pRK0Y9vk="; + }; + "MdeModulePkg/Library/BrotliCustomDecompressLib/brotli" = { + owner = "google"; + repo = "brotli"; + rev = "f4153a09f87cbb9c826d8fc12c74642bb2d879ea"; + hash = "sha256-pHC3aMcJ+6//x7T/4sU32+KsstmRwbR4JZPGtdjqrMU="; + }; + "BaseTools/Source/C/BrotliCompress/brotli" = { + owner = "google"; + repo = "brotli"; + rev = "f4153a09f87cbb9c826d8fc12c74642bb2d879ea"; + hash = "sha256-pHC3aMcJ+6//x7T/4sU32+KsstmRwbR4JZPGtdjqrMU="; + }; + "RedfishPkg/Library/JsonLib/jansson" = { + owner = "akheron"; + repo = "jansson"; + rev = "e9ebfa7e77a6bee77df44e096b100e7131044059"; + hash = "sha256-41QQ3PxNnvQQmX2cLBZgAVCJVZofDb6a/i5WpsG6lHo="; + }; + "UnitTestFrameworkPkg/Library/GoogleTestLib/googletest" = { + owner = "google"; + repo = "googletest"; + rev = "86add13493e5c881d7e4ba77fb91c1f57752b3a4"; + hash = "sha256-KOGkk5PWSDpCGp85ciULPNrylAW9JNRGyeO9JCZyGq8="; + }; + "UnitTestFrameworkPkg/Library/SubhookLib/subhook" = { + owner = "tianocore"; + repo = "edk2-subhook"; + rev = "83d4e1ebef3588fae48b69a7352cc21801cb70bc"; + hash = "sha256-0X9JrYh+g39tJxVn8ofTITet9Is3Oe1avWFzdsRkM2Q="; + }; + "MdePkg/Library/BaseFdtLib/libfdt" = { + owner = "devicetree-org"; + repo = "pylibfdt"; + rev = "cfff805481bdea27f900c32698171286542b8d3c"; + hash = "sha256-BGEWqddR/iUTI+PufhYOswIU86VX9bEuMo4rjD2Zabw="; + }; + "MdePkg/Library/MipiSysTLib/mipisyst" = { + owner = "MIPI-Alliance"; + repo = "public-mipi-sys-t"; + rev = "370b5944c046bab043dd8b133727b2135af7747a"; + hash = "sha256-6wrzZNravSL/M/g792DVUa63ZWK9ydpTCnBpRBNIsHM="; + }; + "CryptoPkg/Library/MbedTlsLib/mbedtls" = { + owner = "ARMmbed"; + repo = "mbedtls"; + rev = "8c89224991adff88d53cd380f42a2baa36f91454"; + hash = "sha256-yb5migP5Tcw99XHFzJkCct4f5R6ztxPR43VQcfTGRtE="; + }; + "SecurityPkg/DeviceSecurity/SpdmLib/libspdm" = { + owner = "DMTF"; + repo = "libspdm"; + rev = "50924a4c8145fc721e17208f55814d2b38766fe6"; + hash = "sha256-GY01N0/bWdWyzDZe1b0qLlmDLz5oxpBdYug8bEs33qg="; + }; +}