Unverified Commit 0fbffad2 authored by Wolfgang Walther's avatar Wolfgang Walther Committed by GitHub
Browse files

postgresqlPackages: housekeeping (#390487)

parents afdcdae9 65cee89d
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
self: super:
let
  inherit (self) lib config;
in
(lib.packagesFromDirectoryRecursive {
  inherit (super) callPackage;
  directory = ./ext;
})
// {
  timescaledb-apache = super.callPackage ./ext/timescaledb.nix { enableUnfree = false; };
}
// lib.optionalAttrs config.allowAliases {
  pg_embedding = throw "PostgreSQL extension `pg_embedding` has been removed since the project has been abandoned. Upstream's recommendation is to use pgvector instead (https://neon.tech/docs/extensions/pg_embedding#migrate-from-pg_embedding-to-pgvector)";
}
+8 −9
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  bison,
  fetchFromGitHub,
  flex,
  lib,
  perl,
  postgresql,
  buildPostgresqlExtension,
  postgresqlBuildExtension,
  stdenv,
}:

let
@@ -17,17 +17,16 @@ let
    "15" = "sha256-webZWgWZGnSoXwTpk816tjbtHV1UIlXkogpBDAEL4gM=";
    "14" = "sha256-jZXhcYBubpjIJ8M5JHXKV5f6VK/2BkypH3P7nLxZz3E=";
    "13" = "sha256-HR6nnWt/V2a0rD5eHHUsFIZ1y7lmvLz36URt9pPJnCw=";
    "12" = "sha256-JFNk17ESsIt20dwXrfBkQ5E6DbZzN/Q9eS6+WjCXGd4=";
  };
in
buildPostgresqlExtension rec {
postgresqlBuildExtension rec {
  pname = "age";
  version = "1.5.0-rc0";

  src = fetchFromGitHub {
    owner = "apache";
    repo = "age";
    rev = "PG${lib.versions.major postgresql.version}/v${
    tag = "PG${lib.versions.major postgresql.version}/v${
      builtins.replaceStrings [ "." ] [ "_" ] version
    }";
    hash =
@@ -73,13 +72,13 @@ buildPostgresqlExtension rec {
    '';
  };

  meta = with lib; {
    broken = !builtins.elem (versions.major postgresql.version) (builtins.attrNames hashes);
  meta = {
    broken = !builtins.elem (lib.versions.major postgresql.version) (builtins.attrNames hashes);
    description = "Graph database extension for PostgreSQL";
    homepage = "https://age.apache.org/";
    changelog = "https://github.com/apache/age/raw/v${src.rev}/RELEASE";
    maintainers = [ ];
    platforms = postgresql.meta.platforms;
    license = licenses.asl20;
    license = lib.licenses.asl20;
  };
}
+6 −6
Original line number Diff line number Diff line
{
  jitSupport,
  lib,
  stdenv,
  llvm,
  nixosTests,
  pg-dump-anon,
  postgresql,
  postgresqlBuildExtension,
  runtimeShell,
  jitSupport,
  llvm,
  buildPostgresqlExtension,
  nixosTests,
  stdenv,
}:

buildPostgresqlExtension (finalAttrs: {
postgresqlBuildExtension (finalAttrs: {
  pname = "postgresql_anonymizer";

  inherit (pg-dump-anon) version src;
+7 −7
Original line number Diff line number Diff line
{
  stdenv,
  lib,
  boost186,
  fetchFromGitHub,
  lib,
  postgresql,
  boost186,
  postgresqlBuildExtension,
  postgresqlTestExtension,
  buildPostgresqlExtension,
  stdenv,
}:

let
@@ -15,7 +15,7 @@ let
    name = "datasketches-postgresql";
    owner = "apache";
    repo = "datasketches-postgresql";
    rev = "refs/tags/${version}";
    tag = version;
    hash = "sha256-W41uAs3W4V7c9O/wBw3rut65bcmY8EdQS1/tPszMGqA=";
  };

@@ -23,12 +23,12 @@ let
    name = "datasketches-cpp";
    owner = "apache";
    repo = "datasketches-cpp";
    rev = "refs/tags/5.0.2";
    tag = "5.0.2";
    hash = "sha256-yGk1OckYipAgLTQK6w6p6EdHMxBIQSjPV/MMND3cDks=";
  };
in

buildPostgresqlExtension (finalAttrs: {
postgresqlBuildExtension (finalAttrs: {
  pname = "apache_datasketches";
  inherit version;

+21 −15
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  curl,
  fetchFromGitHub,
  fetchpatch,
  lib,
  lz4,
  postgresql,
  buildPostgresqlExtension,
  postgresqlBuildExtension,
  stdenv,
}:

buildPostgresqlExtension rec {
postgresqlBuildExtension rec {
  pname = "citus";
  version = "13.0.0";
  version = "13.0.2";

  src = fetchFromGitHub {
    owner = "citusdata";
    repo = "citus";
    rev = "v${version}";
    hash = "sha256-1if/rYMQV1RG4ZkjqTFuFYu5f1JhJiMF4rCVo8gp7+8=";
    tag = "v${version}";
    hash = "sha256-SuJs6OCHKO7efQagsATgn/V9rgMyuXQIHGCEP9ME7tQ=";
  };

  patches = [
    # Even though this commit is on main since Sep 2023, it hasn't made its way to the release-13.0 branch, yet.
    # https://github.com/citusdata/citus/pull/7221
    # Fixes build for PG 16 + 17 on darwin
    (fetchpatch {
      url = "https://github.com/citusdata/citus/commit/0f28a69f12418d211ffba5f7ddd222fd0c47daeb.patch";
      hash = "sha256-8JAM+PUswzbdlAZUpRApgO0eBsMbUHFdFGsdATsG88I=";
    })
  ];

  buildInputs = [
    curl
    lz4
  ];

  meta = with lib; {
  meta = {
    # "Our soft policy for Postgres version compatibility 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"
      ||
        # PostgreSQL 17 support issue upstream: https://github.com/citusdata/citus/issues/7708
        # Check after next package update.
        (versionAtLeast postgresql.version "17" && version == "12.1.6");
    broken = lib.versionOlder postgresql.version "15";
    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;
    license = lib.licenses.agpl3Only;
    maintainers = [ ];
    inherit (postgresql.meta) platforms;
  };
Loading