about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/servers/clickhouse/default.nix18
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 16 insertions, 6 deletions
diff --git a/pkgs/servers/clickhouse/default.nix b/pkgs/servers/clickhouse/default.nix
index 8bb7aafc3c5af..da73bc3c60128 100644
--- a/pkgs/servers/clickhouse/default.nix
+++ b/pkgs/servers/clickhouse/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, cmake, libtool, lldClang, ninja
+{ stdenv, fetchFromGitHub, fetchpatch, cmake, libtool, lldClang, ninja
 , boost, brotli, capnproto, cctz, clang-unwrapped, double-conversion
 , icu, jemalloc, libcpuid, libxml2, lld, llvm, lz4, libmysqlclient, openssl, perl
 , poco, protobuf, python3, rapidjson, re2, rdkafka, readline, sparsehash, unixODBC
@@ -7,14 +7,14 @@
 
 stdenv.mkDerivation rec {
   pname = "clickhouse";
-  version = "20.5.2.7";
+  version = "20.11.4.13";
 
   src = fetchFromGitHub {
     owner  = "ClickHouse";
     repo   = "ClickHouse";
     rev    = "v${version}-stable";
     fetchSubmodules = true;
-    sha256 = "15b499czsv727wwdb1i1ja5wfsk6ii3pqpk6dlqic9cdmkh8c8ic";
+    sha256 = "0c87k0xqwj9sc3xy2f3ngfszgjiz4rzd787bdg6fxp94w1adjhny";
   };
 
   nativeBuildInputs = [ cmake libtool lldClang.bintools ninja ];
@@ -25,6 +25,15 @@ stdenv.mkDerivation rec {
     xxHash zstd
   ];
 
+  patches = [
+    # This patch is only required for 20.11.4.13 - it should be included in the
+    # next stable release from upstream by default
+    (fetchpatch {
+      url = "https://github.com/ClickHouse/ClickHouse/commit/e31753b4db7aa0a72a85757dc11fc403962e30db.patch";
+      sha256 = "12ax02dh9y9k8smkj6v50yfr46iprscbrvd4bb9vfbx8xqgw7grb";
+    })
+  ];
+
   postPatch = ''
     patchShebangs src/
 
@@ -46,7 +55,8 @@ stdenv.mkDerivation rec {
 
   cmakeFlags = [
     "-DENABLE_TESTS=OFF"
-    "-DUSE_INTERNAL_LLVM_LIBRARY=OFF"
+    "-DENABLE_EMBEDDED_COMPILER=ON"
+    "-USE_INTERNAL_LLVM_LIBRARY=OFF"
   ];
 
   postInstall = ''
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 1f26c2316c04c..40acceafc2e0d 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -16874,8 +16874,8 @@ in
   clamsmtp = callPackage ../servers/mail/clamsmtp { };
 
   clickhouse = callPackage ../servers/clickhouse {
-    # clickhouse doesn't build on llvm8.
-    inherit (llvmPackages_9) clang-unwrapped lld lldClang llvm;
+    # upstream requires llvm10 as of v20.11.4.13
+    inherit (llvmPackages_10) clang-unwrapped lld lldClang llvm;
   };
 
   couchdb = callPackage ../servers/http/couchdb {