folly: fix build on aarch64-linux

This commit is contained in:
Andrew Hamon
2023-02-08 22:33:11 -08:00
committed by Florian Brandes
parent 8159eae067
commit a35c142bcb

View File

@@ -1,4 +1,5 @@
{ lib, stdenv
{ lib
, stdenv
, fetchFromGitHub
, boost
, cmake
@@ -57,7 +58,13 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = lib.optional stdenv.isLinux jemalloc;
NIX_CFLAGS_COMPILE = [ "-DFOLLY_MOBILE=${if follyMobile then "1" else "0"}" "-fpermissive" ];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
# temporary hack until folly builds work on aarch64,
# see https://github.com/facebook/folly/issues/1880
"-DCMAKE_LIBRARY_ARCHITECTURE=${if stdenv.isx86_64 then "x86_64" else "dummy"}"
];
postFixup = ''
substituteInPlace "$out"/lib/pkgconfig/libfolly.pc \