From 3f3cec6d9e0ea459823ddc557b9a99f4ef2c5b95 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 18 May 2021 12:04:37 +0200 Subject: [PATCH] clickhouse: 20.11.4.13-stable -> 21.3.11.5-lts Failing Hydra build: https://hydra.nixos.org/build/143269865 ZHF #122042 --- .../modules/services/databases/clickhouse.nix | 1 + nixos/tests/clickhouse.nix | 1 + pkgs/servers/clickhouse/default.nix | 19 ++++--------------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/nixos/modules/services/databases/clickhouse.nix b/nixos/modules/services/databases/clickhouse.nix index 27440fec4e10..f2f4e9d25542 100644 --- a/nixos/modules/services/databases/clickhouse.nix +++ b/nixos/modules/services/databases/clickhouse.nix @@ -42,6 +42,7 @@ with lib; User = "clickhouse"; Group = "clickhouse"; ConfigurationDirectory = "clickhouse-server"; + AmbientCapabilities = "CAP_SYS_NICE"; StateDirectory = "clickhouse"; LogsDirectory = "clickhouse"; ExecStart = "${pkgs.clickhouse}/bin/clickhouse-server --config-file=${pkgs.clickhouse}/etc/clickhouse-server/config.xml"; diff --git a/nixos/tests/clickhouse.nix b/nixos/tests/clickhouse.nix index 98d8b4b46525..017f2ee35dab 100644 --- a/nixos/tests/clickhouse.nix +++ b/nixos/tests/clickhouse.nix @@ -4,6 +4,7 @@ import ./make-test-python.nix ({ pkgs, ... }: { machine = { services.clickhouse.enable = true; + virtualisation.memorySize = 4096; }; testScript = diff --git a/pkgs/servers/clickhouse/default.nix b/pkgs/servers/clickhouse/default.nix index 087f96285059..51d091f0ad3e 100644 --- a/pkgs/servers/clickhouse/default.nix +++ b/pkgs/servers/clickhouse/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, libtool, lldClang, ninja +{ lib, stdenv, fetchFromGitHub, 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,16 +7,16 @@ stdenv.mkDerivation rec { pname = "clickhouse"; - version = "20.11.4.13"; + version = "21.3.11.5"; broken = stdenv.buildPlatform.is32bit; # not supposed to work on 32-bit https://github.com/ClickHouse/ClickHouse/pull/23959#issuecomment-835343685 src = fetchFromGitHub { owner = "ClickHouse"; repo = "ClickHouse"; - rev = "v${version}-stable"; + rev = "v${version}-lts"; fetchSubmodules = true; - sha256 = "0c87k0xqwj9sc3xy2f3ngfszgjiz4rzd787bdg6fxp94w1adjhny"; + sha256 = "sha256-V62Z82p21qtvSOsoXM225/Wkc9F+dvVMz0xpVjhgZVo="; }; nativeBuildInputs = [ cmake libtool lldClang.bintools ninja ]; @@ -27,20 +27,9 @@ 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/ - substituteInPlace contrib/openssl-cmake/CMakeLists.txt \ - --replace '/usr/bin/env perl' perl substituteInPlace src/Storages/System/StorageSystemLicenses.sh \ --replace 'git rev-parse --show-toplevel' '$src' substituteInPlace utils/check-style/check-duplicate-includes.sh \