summary refs log tree commit diff
path: root/pkgs/servers/clickhouse
diff options
context:
space:
mode:
authoredef <edef@edef.eu>2023-11-12 06:30:34 +0000
committeredef <edef@edef.eu>2023-11-12 11:35:19 +0000
commitadd1a9c03d2c67aebbdb56b2dc8e161b21edcef6 (patch)
treeaf5642e14aec11a8adf85d75ba1122d02802ef60 /pkgs/servers/clickhouse
parent85f1ba3e51676fa8cc604a3d863d729026a6b8eb (diff)
clickhouse: 23.3.13.6 -> 23.10.3.5
Diffstat (limited to 'pkgs/servers/clickhouse')
-rw-r--r--pkgs/servers/clickhouse/default.nix47
1 files changed, 19 insertions, 28 deletions
diff --git a/pkgs/servers/clickhouse/default.nix b/pkgs/servers/clickhouse/default.nix
index 959b16ceac429..f50037ab8b994 100644
--- a/pkgs/servers/clickhouse/default.nix
+++ b/pkgs/servers/clickhouse/default.nix
@@ -6,6 +6,7 @@
 , ninja
 , python3
 , perl
+, nasm
 , yasm
 , nixosTests
 , darwin
@@ -24,19 +25,19 @@ let
   inherit (llvmPackages) stdenv;
   mkDerivation = (
     if stdenv.isDarwin
-    then darwin.apple_sdk_11_0.llvmPackages_15.stdenv
+    then darwin.apple_sdk_11_0.llvmPackages_16.stdenv
     else llvmPackages.stdenv).mkDerivation;
 in mkDerivation rec {
   pname = "clickhouse";
-  version = "23.3.13.6";
+  version = "23.10.3.5";
 
   src = fetchFromGitHub rec {
     owner = "ClickHouse";
     repo = "ClickHouse";
-    rev = "v${version}-lts";
+    rev = "v${version}-stable";
     fetchSubmodules = true;
     name = "clickhouse-${rev}.tar.gz";
-    hash = "sha256-ryUjXN8UNGmkZTkqNHotB4C2E1MHZhx2teqXrlp5ySQ=";
+    hash = "sha256-H3nIhBydLBxSesGrvqmwHmBoQGCGQlWgVVUudKLLkIY=";
     postFetch = ''
       # delete files that make the source too big
       rm -rf $out/contrib/llvm-project/llvm/test
@@ -67,7 +68,9 @@ in mkDerivation rec {
     ninja
     python3
     perl
+    llvmPackages.lld
   ] ++ lib.optionals stdenv.isx86_64 [
+    nasm
     yasm
   ] ++ lib.optionals stdenv.isDarwin [
     llvmPackages.bintools
@@ -92,17 +95,11 @@ in mkDerivation rec {
     preBuild = "cd generator";
     hash = "sha256-dhUgpwSjE9NZ2mCkhGiydI51LIOClA5wwk1O3mnnbM8=";
   } else null;
-  blake3Deps = if rustSupport then rustPlatform.fetchCargoTarball {
+  rustDeps = if rustSupport then rustPlatform.fetchCargoTarball {
     inherit src;
-    name = "blake3-deps";
-    preBuild = "cd rust/BLAKE3";
-    hash = "sha256-lDMmmsyjEbTfI5NgTgT4+8QQrcUE/oUWfFgj1i19W0Q=";
-  } else null;
-  skimDeps = if rustSupport then rustPlatform.fetchCargoTarball {
-    inherit src;
-    name = "skim-deps";
-    preBuild = "cd rust/skim";
-    hash = "sha256-gEWB+U8QrM0yYyMXpwocszJZgOemdTlbSzKNkS0NbPk=";
+    name = "rust-deps";
+    preBuild = "cd rust";
+    hash = "sha256-fWDAGm19b7uZv8aBdBoieY5c6POd8IxFXbGdtONpZbw=";
   } else null;
 
   dontCargoSetupPostUnpack = true;
@@ -117,14 +114,12 @@ in mkDerivation rec {
     corrosionDepsCopy="$cargoDepsCopy"
     popd
 
-    pushd rust/BLAKE3
-    cargoDeps="$blake3Deps" cargoSetupPostUnpackHook
-    blake3DepsCopy="$cargoDepsCopy"
-    popd
-
-    pushd rust/skim
-    cargoDeps="$skimDeps" cargoSetupPostUnpackHook
-    skimDepsCopy="$cargoDepsCopy"
+    pushd rust
+    cargoDeps="$rustDeps" cargoSetupPostUnpackHook
+    rustDepsCopy="$cargoDepsCopy"
+    cat .cargo/config >> .cargo/config.toml.in
+    cat .cargo/config >> skim/.cargo/config.toml.in
+    rm .cargo/config
     popd
 
     popd
@@ -152,12 +147,8 @@ in mkDerivation rec {
     cargoDepsCopy="$corrosionDepsCopy" cargoSetupPostPatchHook
     popd
 
-    pushd rust/BLAKE3
-    cargoDepsCopy="$blake3DepsCopy" cargoSetupPostPatchHook
-    popd
-
-    pushd rust/skim
-    cargoDepsCopy="$skimDepsCopy" cargoSetupPostPatchHook
+    pushd rust
+    cargoDepsCopy="$rustDepsCopy" cargoSetupPostPatchHook
     popd
 
     cargoSetupPostPatchHook() { true; }