forked from supabase/nix-postgres
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcitus.nix
35 lines (28 loc) · 1.17 KB
/
citus.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ lib, curl, lz4, zstd, krb5, icu, stdenv, fetchFromGitHub, postgresql }:
stdenv.mkDerivation rec {
pname = "citus";
version = "12.0.0";
buildInputs = [ curl lz4 zstd krb5 icu.dev postgresql];
src = fetchFromGitHub {
owner = "citusdata";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-HH9/slsCRe2yIVIqwR8sDyqXFonf8BHhJhLzHNv1CF0=";
};
installPhase = ''
mkdir -p $out/{lib,share/postgresql/extension}
cp src/backend/columnar/citus_columnar.so $out/lib
cp src/backend/columnar/citus_columnar.control $out/share/postgresql/extension
cp src/backend/columnar/build/sql/*.sql $out/share/postgresql/extension
cp src/backend/distributed/citus.so $out/lib
cp src/backend/distributed/citus.control $out/share/postgresql/extension
cp src/backend/distributed/build/sql/*.sql $out/share/postgresql/extension
'';
meta = with lib; {
description = "Distributed PostgreSQL as an extension";
homepage = "https://github.com/citusdata/${pname}";
maintainers = with maintainers; [ olirice ];
platforms = postgresql.meta.platforms;
license = licenses.agpl3Plus;
};
}