clickhouse, clickhouse-lts: fix darwin build (#440536)

authored by misuzu.tngl.sh and committed by GitHub 0b2cc347 97c81f0c

+18 -14
+18 -14
pkgs/by-name/cl/clickhouse/generic.nix
··· 90 91 dontCargoSetupPostUnpack = true; 92 93 - # Should not be necessary after 25.9 94 - patches = lib.optional (lib.versions.majorMinor version == "25.8") (fetchpatch { 95 - url = "https://github.com/ClickHouse/ClickHouse/commit/67a42b78cdf1c793e78c1adbcc34162f67044032.patch"; 96 - sha256 = "7VF+JSztqTWD+aunCS3UVNxlRdwHc2W5fNqzDyeo3Fc="; 97 - }); 98 99 postPatch = '' 100 patchShebangs src/ utils/ 101 - 102 - sed -i 's|/usr/bin/env perl|"${lib.getExe perl}"|' contrib/openssl-cmake/CMakeLists.txt 103 - 104 - substituteInPlace utils/list-licenses/list-licenses.sh \ 105 - --replace-fail '$(git rev-parse --show-toplevel)' "$NIX_BUILD_TOP/$sourceRoot" 106 - '' 107 - + lib.optionalString (lib.versions.majorMinor version <= "25.6") '' 108 - substituteInPlace src/Storages/System/StorageSystemLicenses.sh \ 109 - --replace-fail '$(git rev-parse --show-toplevel)' "$NIX_BUILD_TOP/$sourceRoot" 110 '' 111 + lib.optionalString stdenv.hostPlatform.isDarwin '' 112 substituteInPlace cmake/tools.cmake \ 113 --replace-fail 'gfind' 'find' \ 114 --replace-fail 'ggrep' 'grep' \ 115 --replace-fail '--ld-path=''${LLD_PATH}' '-fuse-ld=lld' 116 '' 117 # Rust is handled by cmake 118 + lib.optionalString rustSupport ''
··· 90 91 dontCargoSetupPostUnpack = true; 92 93 + patches = 94 + lib.optional (lib.versions.majorMinor version == "25.8") (fetchpatch { 95 + # Disable building WASM lexer 96 + url = "https://github.com/ClickHouse/ClickHouse/commit/67a42b78cdf1c793e78c1adbcc34162f67044032.patch"; 97 + sha256 = "7VF+JSztqTWD+aunCS3UVNxlRdwHc2W5fNqzDyeo3Fc="; 98 + }) 99 + ++ 100 + 101 + lib.optional (lib.versions.majorMinor version == "25.8" && stdenv.hostPlatform.isDarwin) 102 + (fetchpatch { 103 + # Do not intercept memalign on darwin 104 + url = "https://github.com/ClickHouse/ClickHouse/commit/0cfd2dbe981727fb650f3b9935f5e7e7e843180f.patch"; 105 + sha256 = "1iNYZbugX2g2dxNR1ZiUthzPnhLUR8g118aG23yhgUo="; 106 + }); 107 108 postPatch = '' 109 patchShebangs src/ utils/ 110 '' 111 + lib.optionalString stdenv.hostPlatform.isDarwin '' 112 substituteInPlace cmake/tools.cmake \ 113 --replace-fail 'gfind' 'find' \ 114 --replace-fail 'ggrep' 'grep' \ 115 --replace-fail '--ld-path=''${LLD_PATH}' '-fuse-ld=lld' 116 + 117 + substituteInPlace utils/list-licenses/list-licenses.sh \ 118 + --replace-fail 'gfind' 'find' \ 119 + --replace-fail 'ggrep' 'grep' 120 '' 121 # Rust is handled by cmake 122 + lib.optionalString rustSupport ''