Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

Commit a83b5d9

Browse files
committed
citus extension
1 parent dca7f56 commit a83b5d9

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

ext/citus.nix

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{ lib, curl, lz4, zstd, krb5, icu, stdenv, fetchFromGitHub, postgresql }:
2+
3+
stdenv.mkDerivation rec {
4+
pname = "citus";
5+
version = "12.0.0";
6+
7+
buildInputs = [ curl lz4 zstd krb5 icu.dev postgresql];
8+
9+
src = fetchFromGitHub {
10+
owner = "citusdata";
11+
repo = pname;
12+
rev = "refs/tags/v${version}";
13+
hash = "sha256-HH9/slsCRe2yIVIqwR8sDyqXFonf8BHhJhLzHNv1CF0=";
14+
};
15+
16+
installPhase = ''
17+
mkdir -p $out/{lib,share/postgresql/extension}
18+
19+
cp *.so $out/lib
20+
cp *.sql $out/share/postgresql/extension
21+
cp *.control $out/share/postgresql/extension
22+
'';
23+
24+
meta = with lib; {
25+
description = "Distributed PostgreSQL as an extension";
26+
homepage = "https://github.com/citusdata/${pname}";
27+
maintainers = with maintainers; [ olirice ];
28+
platforms = postgresql.meta.platforms;
29+
license = licenses.agpl3Plus;
30+
};
31+
}

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
# rollout new versions of these critical things easier without having to
8888
# go through the upstream release engineering process.
8989
ourExtensions = [
90+
./ext/citus.nix
9091
./ext/pgsql-http.nix
9192
./ext/pg_plan_filter.nix
9293
./ext/pg_net.nix

tests/postgresql.conf.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ default_text_search_config = 'pg_catalog.english'
717717

718718
#local_preload_libraries = ''
719719
#session_preload_libraries = ''
720-
shared_preload_libraries = 'auto_explain,pgsodium'
720+
shared_preload_libraries = 'citus,auto_explain,pgsodium'
721721
#jit_provider = 'llvmjit' # JIT library to use
722722

723723
# - Other Defaults -

0 commit comments

Comments
 (0)