diff --git a/pkgs/servers/sql/postgresql/ext/apache_datasketches.nix b/pkgs/servers/sql/postgresql/ext/apache_datasketches.nix index 43884c22a13a..d215a5467bcf 100644 --- a/pkgs/servers/sql/postgresql/ext/apache_datasketches.nix +++ b/pkgs/servers/sql/postgresql/ext/apache_datasketches.nix @@ -1,6 +1,7 @@ { boost186, fetchFromGitHub, + fetchpatch, lib, postgresql, postgresqlBuildExtension, @@ -22,8 +23,8 @@ let name = "datasketches-cpp"; owner = "apache"; repo = "datasketches-cpp"; - tag = "5.0.2"; - hash = "sha256-yGk1OckYipAgLTQK6w6p6EdHMxBIQSjPV/MMND3cDks="; + tag = "5.2.0"; + hash = "sha256-h4+cln01jqLV0EpIqScpCyw8jxZgoVtdfBEjdvyUuVk="; }; in @@ -41,10 +42,18 @@ postgresqlBuildExtension (finalAttrs: { # fails to build with boost 1.87 buildInputs = [ boost186 ]; - patchPhase = '' - runHook prePatch - cp -r ../${cpp_src.name} . - runHook postPatch + patches = [ + # https://github.com/apache/datasketches-cpp/pull/500 + (fetchpatch { + url = "https://github.com/apache/datasketches-cpp/commit/639134f6e88483bd1bfca451cf09d243ade9bdd4.patch"; + hash = "sha256-6SYKy3NycYABnUCuLUXQz+mTx4VaeWMlHnJ6aM+sNt4="; + stripLen = 1; + extraPrefix = "datasketches-cpp/"; + }) + ]; + + prePatch = '' + cp --no-preserve=mode -r ../${cpp_src.name} . ''; enableUpdateScript = false;