diff --git a/pkgs/development/libraries/libressl/default.nix b/pkgs/development/libraries/libressl/default.nix index e1d1413a7054..471cdca203a4 100644 --- a/pkgs/development/libraries/libressl/default.nix +++ b/pkgs/development/libraries/libressl/default.nix @@ -16,9 +16,10 @@ let version, hash, patches ? [ ], + postPatch ? "", knownVulnerabilities ? [ ], }: - stdenv.mkDerivation rec { + stdenv.mkDerivation { pname = "libressl"; inherit version; @@ -55,9 +56,11 @@ let inherit patches; - postPatch = '' - patchShebangs tests/ - ''; + postPatch = + '' + patchShebangs tests/ + '' + + postPatch; doCheck = !(stdenv.hostPlatform.isPower64 || stdenv.hostPlatform.isRiscV); preCheck = '' @@ -152,5 +155,16 @@ in libressl_4_1 = generic { version = "4.1.0"; hash = "sha256-D3HBa9NL2qzNy5al2UpJIb+2EuxuDrp6gNiFTu/Yu2E="; + # Fixes build on loongarch64 + # https://github.com/libressl/portable/pull/1184 + postPatch = '' + mkdir -p include/arch/loongarch64 + cp ${ + fetchurl { + url = "https://github.com/libressl/portable/raw/refs/tags/v4.1.0/include/arch/loongarch64/opensslconf.h"; + hash = "sha256-68dw5syUy1z6GadCMR4TR9+0UQX6Lw/CbPWvjHGAhgo="; + } + } include/arch/loongarch64/opensslconf.h + ''; }; }