about summary refs log tree commit diff
path: root/third_party/overlays
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2024-01-16T15·42+0100
committerclbot <clbot@tvl.fyi>2024-01-16T16·11+0000
commit28ebd0d5c874dfbdc4db2ab2ca8c2c2747ff4973 (patch)
tree2dad9f04418a2f78d092c8d518ce994ec1764f65 /third_party/overlays
parent0cca72f2f1935f2e88ce328a88e73a0b75afa7e0 (diff)
chore(3p/overlays): unvendor clickhouse r/7392
Change-Id: I1b8f2f7bc42ce436ece888daa5fc0ae69a454f41
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10643
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'third_party/overlays')
-rw-r--r--third_party/overlays/clickhouse/.skip-tree1
-rw-r--r--third_party/overlays/clickhouse/default.nix203
-rw-r--r--third_party/overlays/tvl.nix12
3 files changed, 0 insertions, 216 deletions
diff --git a/third_party/overlays/clickhouse/.skip-tree b/third_party/overlays/clickhouse/.skip-tree
deleted file mode 100644
index 2b09755665..0000000000
--- a/third_party/overlays/clickhouse/.skip-tree
+++ /dev/null
@@ -1 +0,0 @@
-this needs to be callPackage'd
diff --git a/third_party/overlays/clickhouse/default.nix b/third_party/overlays/clickhouse/default.nix
deleted file mode 100644
index 978a115f5c..0000000000
--- a/third_party/overlays/clickhouse/default.nix
+++ /dev/null
@@ -1,203 +0,0 @@
-{ lib
-, llvmPackages
-, fetchFromGitHub
-, fetchpatch
-, cmake
-, ninja
-, python3
-, perl
-, nasm
-, yasm
-, nixosTests
-, darwin
-, findutils
-
-  # currently for BLAKE3 hash function
-, rustSupport ? true
-
-, corrosion
-, rustc
-, cargo
-, rustPlatform
-}:
-
-let
-  inherit (llvmPackages) stdenv;
-  mkDerivation = (
-    if stdenv.isDarwin
-    then darwin.apple_sdk_11_0.llvmPackages_16.stdenv
-    else llvmPackages.stdenv
-  ).mkDerivation;
-in
-mkDerivation rec {
-  pname = "clickhouse";
-  version = "23.10.3.5";
-
-  src = fetchFromGitHub rec {
-    owner = "ClickHouse";
-    repo = "ClickHouse";
-    rev = "v${version}-stable";
-    fetchSubmodules = true;
-    name = "clickhouse-${rev}.tar.gz";
-    hash = "sha256-H3nIhBydLBxSesGrvqmwHmBoQGCGQlWgVVUudKLLkIY=";
-    postFetch = ''
-      # delete files that make the source too big
-      rm -rf $out/contrib/llvm-project/llvm/test
-      rm -rf $out/contrib/llvm-project/clang/test
-      rm -rf $out/contrib/croaring/benchmarks
-
-      # fix case insensitivity on macos https://github.com/NixOS/nixpkgs/issues/39308
-      rm -rf $out/contrib/sysroot/linux-*
-      rm -rf $out/contrib/liburing/man
-
-      # compress to not exceed the 2GB output limit
-      # try to make a deterministic tarball
-      tar -I 'gzip -n' \
-        --sort=name \
-        --mtime=1970-01-01 \
-        --owner=0 --group=0 \
-        --numeric-owner --mode=go=rX,u+rw,a-s \
-        --transform='s@^@source/@S' \
-        -cf temp  -C "$out" .
-      rm -r "$out"
-      mv temp "$out"
-    '';
-  };
-
-  strictDeps = true;
-  nativeBuildInputs = [
-    cmake
-    ninja
-    python3
-    perl
-    llvmPackages.lld
-  ] ++ lib.optionals stdenv.isx86_64 [
-    nasm
-    yasm
-  ] ++ lib.optionals stdenv.isDarwin [
-    llvmPackages.bintools
-    findutils
-    darwin.bootstrap_cmds
-  ] ++ lib.optionals rustSupport [
-    rustc
-    cargo
-    rustPlatform.cargoSetupHook
-  ];
-
-  # their vendored version is too old and missing this patch: https://github.com/corrosion-rs/corrosion/pull/205
-  corrosionSrc =
-    if rustSupport then
-      fetchFromGitHub
-        {
-          owner = "corrosion-rs";
-          repo = "corrosion";
-          rev = "v0.3.5";
-          hash = "sha256-r/jrck4RiQynH1+Hx4GyIHpw/Kkr8dHe1+vTHg+fdRs=";
-        } else null;
-  corrosionDeps =
-    if rustSupport then
-      rustPlatform.fetchCargoTarball
-        {
-          src = corrosionSrc;
-          name = "corrosion-deps";
-          preBuild = "cd generator";
-          hash = "sha256-dhUgpwSjE9NZ2mCkhGiydI51LIOClA5wwk1O3mnnbM8=";
-        } else null;
-  rustDeps =
-    if rustSupport then
-      rustPlatform.fetchCargoTarball
-        {
-          inherit src;
-          name = "rust-deps";
-          preBuild = "cd rust";
-          hash = "sha256-fWDAGm19b7uZv8aBdBoieY5c6POd8IxFXbGdtONpZbw=";
-        } else null;
-
-  dontCargoSetupPostUnpack = true;
-  postUnpack = lib.optionalString rustSupport ''
-    pushd source
-
-    rm -rf contrib/corrosion
-    cp -r --no-preserve=mode $corrosionSrc contrib/corrosion
-
-    pushd contrib/corrosion/generator
-    cargoDeps="$corrosionDeps" cargoSetupPostUnpackHook
-    corrosionDepsCopy="$cargoDepsCopy"
-    popd
-
-    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
-  '';
-
-  postPatch = ''
-    patchShebangs src/
-
-    substituteInPlace src/Storages/System/StorageSystemLicenses.sh \
-      --replace 'git rev-parse --show-toplevel' '$src'
-    substituteInPlace utils/check-style/check-duplicate-includes.sh \
-      --replace 'git rev-parse --show-toplevel' '$src'
-    substituteInPlace utils/check-style/check-ungrouped-includes.sh \
-      --replace 'git rev-parse --show-toplevel' '$src'
-    substituteInPlace utils/list-licenses/list-licenses.sh \
-      --replace 'git rev-parse --show-toplevel' '$src'
-    substituteInPlace utils/check-style/check-style \
-      --replace 'git rev-parse --show-toplevel' '$src'
-  '' + lib.optionalString stdenv.isDarwin ''
-    sed -i 's|gfind|find|' cmake/tools.cmake
-    sed -i 's|ggrep|grep|' cmake/tools.cmake
-  '' + lib.optionalString rustSupport ''
-
-    pushd contrib/corrosion/generator
-    cargoDepsCopy="$corrosionDepsCopy" cargoSetupPostPatchHook
-    popd
-
-    pushd rust
-    cargoDepsCopy="$rustDepsCopy" cargoSetupPostPatchHook
-    popd
-
-    cargoSetupPostPatchHook() { true; }
-  '';
-
-  cmakeFlags = [
-    "-DENABLE_TESTS=OFF"
-    "-DCOMPILER_CACHE=disabled"
-    "-DENABLE_EMBEDDED_COMPILER=ON"
-  ];
-
-  # https://github.com/ClickHouse/ClickHouse/issues/49988
-  hardeningDisable = [ "fortify" ];
-
-  postInstall = ''
-    rm -rf $out/share/clickhouse-test
-
-    sed -i -e '\!<log>/var/log/clickhouse-server/clickhouse-server\.log</log>!d' \
-      $out/etc/clickhouse-server/config.xml
-    substituteInPlace $out/etc/clickhouse-server/config.xml \
-      --replace "<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>" "<console>1</console>"
-    substituteInPlace $out/etc/clickhouse-server/config.xml \
-      --replace "<level>trace</level>" "<level>warning</level>"
-  '';
-
-  # Builds in 7+h with 2 cores, and ~20m with a big-parallel builder.
-  requiredSystemFeatures = [ "big-parallel" ];
-
-  passthru.tests.clickhouse = nixosTests.clickhouse;
-
-  meta = with lib; {
-    homepage = "https://clickhouse.com";
-    description = "Column-oriented database management system";
-    license = licenses.asl20;
-    maintainers = with maintainers; [ orivej ];
-
-    # not supposed to work on 32-bit https://github.com/ClickHouse/ClickHouse/pull/23959#issuecomment-835343685
-    platforms = lib.filter (x: (lib.systems.elaborate x).is64bit) (platforms.linux ++ platforms.darwin);
-    broken = stdenv.buildPlatform != stdenv.hostPlatform;
-  };
-}
diff --git a/third_party/overlays/tvl.nix b/third_party/overlays/tvl.nix
index 876fcf3fa8..0985bcb5a6 100644
--- a/third_party/overlays/tvl.nix
+++ b/third_party/overlays/tvl.nix
@@ -134,16 +134,4 @@ depot.nix.readTree.drvTargets {
       license = licenses.asl20;
     };
   };
-
-  # we're vendoring this for now, since the version upgrade has a lot of changes
-  # we can't merge it upstream yet because the Darwin build is broken
-  # https://github.com/NixOS/nixpkgs/pull/267033
-  clickhouse = (super.callPackage ./clickhouse {
-    llvmPackages = super.llvmPackages_16;
-  }).overrideAttrs (old: {
-    patches = old.patches or [ ] ++ [
-      # https://github.com/ClickHouse/ClickHouse/pull/56118
-      ./patches/clickhouse-support-reading-arrow-LargeListArray.patch
-    ];
-  });
 }