osrm-backend: fix build on `x86_64-darwin` (#344906)

authored by Franz Pletz and committed by GitHub 14f0c29b 273796eb

+21 -7
+21 -7
pkgs/servers/osrm-backend/default.nix
··· 53 53 }) 54 54 ]; 55 55 56 - env.NIX_CFLAGS_COMPILE = toString [ 57 - # Needed with GCC 12 58 - "-Wno-error=stringop-overflow" 59 - "-Wno-error=uninitialized" 60 - # Needed for GCC 13 61 - "-Wno-error=array-bounds" 62 - ]; 56 + env.NIX_CFLAGS_COMPILE = toString ( 57 + [ 58 + # Needed with GCC 12 59 + "-Wno-error=stringop-overflow" 60 + "-Wno-error=uninitialized" 61 + # Needed for GCC 13 62 + "-Wno-error=array-bounds" 63 + ] 64 + ++ 65 + # error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.13 or newer 66 + (lib.optionals 67 + ( 68 + stdenv.hostPlatform.isDarwin 69 + && stdenv.hostPlatform.isx86_64 70 + && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13" 71 + ) 72 + [ 73 + "-faligned-allocation" 74 + ] 75 + ) 76 + ); 63 77 64 78 postInstall = '' 65 79 mkdir -p $out/share/osrm-backend