summary refs log tree commit diff
path: root/pkgs/development/libraries/folly/default.nix
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2022-02-09 19:25:19 -0800
committerJonathan Ringer <jonringer117@gmail.com>2022-02-09 19:25:19 -0800
commit2c30bcd1b184f25506958867721158463eac589c (patch)
treec2cdecc826ef9401c66720f8d08770f023541146 /pkgs/development/libraries/folly/default.nix
parent6c7fd66b5b60df3411a23b0df1de766d24df701d (diff)
downloadnixpkgs-2c30bcd1b184f25506958867721158463eac589c.tar
nixpkgs-2c30bcd1b184f25506958867721158463eac589c.tar.gz
nixpkgs-2c30bcd1b184f25506958867721158463eac589c.tar.bz2
nixpkgs-2c30bcd1b184f25506958867721158463eac589c.tar.lz
nixpkgs-2c30bcd1b184f25506958867721158463eac589c.tar.xz
nixpkgs-2c30bcd1b184f25506958867721158463eac589c.tar.zst
nixpkgs-2c30bcd1b184f25506958867721158463eac589c.zip
folly: 2021.10.25.00 -> 2022.02.07.00
Diffstat (limited to 'pkgs/development/libraries/folly/default.nix')
-rw-r--r--pkgs/development/libraries/folly/default.nix35
1 files changed, 18 insertions, 17 deletions
diff --git a/pkgs/development/libraries/folly/default.nix b/pkgs/development/libraries/folly/default.nix
index 85c80532b51..2f02698f3ab 100644
--- a/pkgs/development/libraries/folly/default.nix
+++ b/pkgs/development/libraries/folly/default.nix
@@ -1,31 +1,33 @@
 { lib, stdenv
 , fetchFromGitHub
-, cmake
 , boost
-, libevent
+, cmake
 , double-conversion
-, glog
+, fetchpatch
+, fmt_8
 , gflags
+, glog
+, libevent
 , libiberty
+, libunwind
 , lz4
-, xz
-, zlib
-, jemalloc
 , openssl
 , pkg-config
-, libunwind
-, fmt
+, xz
+, zlib
+, zstd
+, follyMobile ? false
 }:
 
-stdenv.mkDerivation (rec {
+stdenv.mkDerivation rec {
   pname = "folly";
-  version = "2021.10.25.00";
+  version = "2022.02.07.00";
 
   src = fetchFromGitHub {
     owner = "facebook";
     repo = "folly";
     rev = "v${version}";
-    sha256 = "sha256-+di8Dzt5NRbqIydBR4sB6bUbQrZZ8URUosdP2JGQMec=";
+    sha256 = "sha256-C/PQBXhOELNxQFfQhgQeU+QmsdtFeBESyWerC+QZBEI=";
   };
 
   nativeBuildInputs = [
@@ -45,11 +47,12 @@ stdenv.mkDerivation (rec {
     lz4
     xz
     zlib
-    jemalloc
     libunwind
-    fmt
+    fmt_8
+    zstd
   ];
 
+  NIX_CFLAGS_COMPILE = [ "-DFOLLY_MOBILE=${if follyMobile then "1" else "0"}" ];
   cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
 
   meta = with lib; {
@@ -57,9 +60,7 @@ stdenv.mkDerivation (rec {
     homepage = "https://github.com/facebook/folly";
     license = licenses.asl20;
     # 32bit is not supported: https://github.com/facebook/folly/issues/103
-    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
     maintainers = with maintainers; [ abbradar pierreis ];
   };
-} // lib.optionalAttrs stdenv.isDarwin {
-  LDFLAGS = "-ljemalloc";
-})
+}