diff options
author | Orivej Desh <orivej@gmx.fr> | 2017-03-27 01:06:23 +0000 |
---|---|---|
committer | Orivej Desh <orivej@gmx.fr> | 2017-04-27 13:25:58 +0000 |
commit | 8f634a78b95dc441317e5bf581da8b803d0863b2 (patch) | |
tree | 66b116cda0c7ade5809338751cb0ee8f3535d5ca /pkgs/servers/clickhouse | |
parent | aecec219d46083420b8db71af2990edcb60812ed (diff) |
clickhouse: init at 1.1.54190
Diffstat (limited to 'pkgs/servers/clickhouse')
-rw-r--r-- | pkgs/servers/clickhouse/default.nix | 34 | ||||
-rw-r--r-- | pkgs/servers/clickhouse/prefix.patch | 30 | ||||
-rw-r--r-- | pkgs/servers/clickhouse/termcap.patch | 25 |
3 files changed, 89 insertions, 0 deletions
diff --git a/pkgs/servers/clickhouse/default.nix b/pkgs/servers/clickhouse/default.nix new file mode 100644 index 000000000000..fc35dfdda476 --- /dev/null +++ b/pkgs/servers/clickhouse/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchFromGitHub, cmake, libtool, boost, double_conversion, gperftools, icu, libmysql, lz4, openssl, poco, re2, readline, sparsehash, unixODBC, zookeeper_mt, zstd }: + +stdenv.mkDerivation rec { + name = "clickhouse-${version}"; + + version = "1.1.54190"; + + src = fetchFromGitHub { + owner = "yandex"; + repo = "ClickHouse"; + rev = "v${version}-stable"; + sha256 = "03snzrhz3ai66fqy3rh89cgmpiaskg3077zflkwzqxwx69jkmqix"; + }; + + patches = [ ./prefix.patch ./termcap.patch ]; + + nativeBuildInputs = [ cmake libtool ]; + + buildInputs = [ boost double_conversion gperftools icu libmysql lz4 openssl poco re2 readline sparsehash unixODBC zookeeper_mt zstd ]; + + cmakeFlags = [ "-DENABLE_TESTS=OFF" "-DUNBUNDLED=ON" "-DUSE_STATIC_LIBRARIES=OFF" ]; + + NIX_CFLAGS_COMPILE = [ "-Wno-error=unused-function" ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + homepage = https://clickhouse.yandex/; + description = "Column-oriented database management system"; + license = licenses.asl20; + maintainers = with maintainers; [ orivej ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/servers/clickhouse/prefix.patch b/pkgs/servers/clickhouse/prefix.patch new file mode 100644 index 000000000000..a311bf83dd9a --- /dev/null +++ b/pkgs/servers/clickhouse/prefix.patch @@ -0,0 +1,30 @@ +From ccc3596aa3ca041f457bf44d3437d935f56e82a4 Mon Sep 17 00:00:00 2001 +From: Orivej Desh <orivej@gmx.fr> +Date: Sun, 26 Mar 2017 23:57:32 +0000 +Subject: [PATCH] Do not override CMAKE_INSTALL_PREFIX + +--- + CMakeLists.txt | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 517b25e..6d8ced2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -141,12 +141,7 @@ if (ENABLE_TESTS) + endif (ENABLE_TESTS) + + # Installation prefix +-if (NOT CMAKE_SYSTEM MATCHES "FreeBSD") +- set (CMAKE_INSTALL_PREFIX /usr) +- set (CLICKHOUSE_ETC_DIR /etc) +-else () +- set (CLICKHOUSE_ETC_DIR ${CMAKE_INSTALL_PREFIX}/etc) +-endif () ++set (CLICKHOUSE_ETC_DIR ${CMAKE_INSTALL_PREFIX}/etc) + + + option (UNBUNDLED "Try find all libraries in system (if fail - use bundled from contrib/)" OFF) +-- +2.12.0 + diff --git a/pkgs/servers/clickhouse/termcap.patch b/pkgs/servers/clickhouse/termcap.patch new file mode 100644 index 000000000000..e030d0956900 --- /dev/null +++ b/pkgs/servers/clickhouse/termcap.patch @@ -0,0 +1,25 @@ +From c2105ecdf6a6cc1fbb4c1ae01475db6a65fee32f Mon Sep 17 00:00:00 2001 +From: Orivej Desh <orivej@gmx.fr> +Date: Mon, 27 Mar 2017 01:39:11 +0000 +Subject: [PATCH] Search for termcap in ncurses + +--- + cmake/find_readline_edit.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/find_readline_edit.cmake b/cmake/find_readline_edit.cmake +index 26f2768..f520ece 100644 +--- a/cmake/find_readline_edit.cmake ++++ b/cmake/find_readline_edit.cmake +@@ -7,7 +7,7 @@ endif () + + list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .so.2) + +-find_library (TERMCAP_LIB NAMES termcap) ++find_library (TERMCAP_LIB NAMES ncurses) + find_library (EDIT_LIB NAMES edit) + + set(READLINE_INCLUDE_PATHS "/var/empty/local/var/empty/readline/include") +-- +2.12.0 + |