mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
84d4f874c2
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRev78e9caf153
result/bin/apply-formatting $NIXPKGS_PATH
72 lines
1.8 KiB
Nix
72 lines
1.8 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitHub,
|
|
postgresql,
|
|
boost,
|
|
postgresqlTestExtension,
|
|
buildPostgresqlExtension,
|
|
}:
|
|
|
|
let
|
|
version = "1.7.0";
|
|
|
|
main_src = fetchFromGitHub {
|
|
name = "datasketches-postgresql";
|
|
owner = "apache";
|
|
repo = "datasketches-postgresql";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-W41uAs3W4V7c9O/wBw3rut65bcmY8EdQS1/tPszMGqA=";
|
|
};
|
|
|
|
cpp_src = fetchFromGitHub {
|
|
name = "datasketches-cpp";
|
|
owner = "apache";
|
|
repo = "datasketches-cpp";
|
|
rev = "refs/tags/5.0.2";
|
|
hash = "sha256-yGk1OckYipAgLTQK6w6p6EdHMxBIQSjPV/MMND3cDks=";
|
|
};
|
|
in
|
|
|
|
buildPostgresqlExtension (finalAttrs: {
|
|
pname = "apache_datasketches";
|
|
inherit version;
|
|
|
|
srcs = [
|
|
main_src
|
|
cpp_src
|
|
];
|
|
|
|
sourceRoot = main_src.name;
|
|
|
|
buildInputs = [ boost ];
|
|
|
|
patchPhase = ''
|
|
runHook prePatch
|
|
cp -r ../${cpp_src.name} .
|
|
runHook postPatch
|
|
'';
|
|
|
|
enableUpdateScript = false;
|
|
passthru.tests.extension = postgresqlTestExtension {
|
|
inherit (finalAttrs) finalPackage;
|
|
sql = ''
|
|
CREATE EXTENSION datasketches;
|
|
SELECT hll_sketch_to_string(hll_sketch_build(1));
|
|
'';
|
|
};
|
|
|
|
meta = {
|
|
description = "PostgreSQL extension providing approximate algorithms for distinct item counts, quantile estimation and frequent items detection";
|
|
longDescription = ''
|
|
apache_datasketches is an extension to support approximate algorithms on PostgreSQL. The implementation
|
|
is based on the Apache Datasketches CPP library, and provides support for HyperLogLog,
|
|
Compressed Probabilistic Counting, KLL, Frequent strings, and Theta sketches.
|
|
'';
|
|
homepage = "https://datasketches.apache.org/";
|
|
platforms = postgresql.meta.platforms;
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ mmusnjak ];
|
|
};
|
|
})
|