diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 593c8b8deddf..152bc01e318a 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -289,6 +289,20 @@ stdenv.mkDerivation { EOF ''; + # Fix compilation to 32-bit ARM with clang in downstream packages + # https://github.com/ned14/outcome/pull/308 + # https://github.com/boostorg/json/pull/1064 + postPatch = lib.optionalString (lib.versionAtLeast version "1.87") '' + substituteInPlace \ + boost/outcome/outcome_gdb.h \ + boost/outcome/experimental/status-code/status_code.hpp \ + boost/json/detail/gdb_printers.hpp \ + boost/unordered/unordered_printers.hpp \ + boost/interprocess/interprocess_printers.hpp \ + libs/json/pretty_printers/generate-gdb-header.py \ + --replace-fail ",@progbits,1" ",%progbits,1" + ''; + env = { NIX_CFLAGS_LINK = lib.optionalString stdenv.hostPlatform.isDarwin "-headerpad_max_install_names"; # copyPkgconfigItems will substitute these in the pkg-config file