23 stdenv.mkDerivation rec {
25 version = "2022.11.07.00";
27 src = fetchFromGitHub {
31 sha256 = "sha256-RzVJuhyLZe5KGnNYUxkiAeYdQf4Amm8cAlV/12kmTj4=";
39 # See CMake/folly-deps.cmake in the Folly source tree.
54 ] ++ lib.optional stdenv.isLinux jemalloc;
56 # jemalloc headers are required in include/folly/portability/Malloc.h
57 propagatedBuildInputs = lib.optional stdenv.isLinux jemalloc;
59 NIX_CFLAGS_COMPILE = [ "-DFOLLY_MOBILE=${if follyMobile then "1" else "0"}" "-fpermissive" ];
60 cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
63 substituteInPlace "$out"/lib/pkgconfig/libfolly.pc \
64 --replace '=''${prefix}//' '=/' \
65 --replace '=''${exec_prefix}//' '=/'
68 # folly-config.cmake, will `find_package` these, thus there should be
69 # a way to ensure abi compatibility.
76 description = "An open-source C++ library developed and used at Facebook";
77 homepage = "https://github.com/facebook/folly";
78 license = licenses.asl20;
79 # 32bit is not supported: https://github.com/facebook/folly/issues/103
80 platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" ];
81 maintainers = with maintainers; [ abbradar pierreis ];