Merge pull request #283084 from marsam/add-citus

postgresqlPackages.citus: init at 12.1.0
This commit is contained in:
Mario Rodas 2024-01-27 05:54:04 -05:00 committed by GitHub
commit d83dedae90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,52 @@
{ lib
, stdenv
, curl
, fetchFromGitHub
, lz4
, postgresql
}:
stdenv.mkDerivation rec {
pname = "citus";
version = "12.1.0";
src = fetchFromGitHub {
owner = "citusdata";
repo = "citus";
rev = "v${version}";
hash = "sha256-ypuinDOHvgjRdbnTTFBpALy6rIR3rrP00JDvlHtmCTk=";
};
buildInputs = [
curl
lz4
postgresql
];
installPhase = ''
runHook preInstall
install -D -t $out/lib src/backend/columnar/citus_columnar${postgresql.dlSuffix}
install -D -t $out/share/postgresql/extension src/backend/columnar/build/sql/*.sql
install -D -t $out/share/postgresql/extension src/backend/columnar/*.control
install -D -t $out/lib src/backend/distributed/citus${postgresql.dlSuffix}
install -D -t $out/share/postgresql/extension src/backend/distributed/build/sql/*.sql
install -D -t $out/share/postgresql/extension src/backend/distributed/*.control
runHook postInstall
'';
meta = with lib; {
# "Our soft policy for Postgres version compatibilty is to support Citus'
# latest release with Postgres' 3 latest releases."
# https://www.citusdata.com/updates/v12-0/#deprecated_features
broken = versionOlder postgresql.version "14";
description = "Distributed PostgreSQL as an extension";
homepage = "https://www.citusdata.com/";
changelog = "https://github.com/citusdata/citus/blob/${src.rev}/CHANGELOG.md";
license = licenses.agpl3Only;
maintainers = with maintainers; [ marsam ];
inherit (postgresql.meta) platforms;
};
}

View File

@ -4,6 +4,8 @@ self: super: {
apache_datasketches = super.callPackage ./ext/apache_datasketches.nix { };
citus = super.callPackage ./ext/citus.nix { };
h3-pg = super.callPackage ./ext/h3-pg.nix { };
hypopg = super.callPackage ./ext/hypopg.nix { };