mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
postgresqlPackages: replace custom installPhase with buildPostgresqlExtension helper
This commit is contained in:
parent
4147fbe554
commit
e24121ec20
55 changed files with 261 additions and 568 deletions
129
pkgs/servers/sql/postgresql/buildPostgresqlExtension.nix
Normal file
129
pkgs/servers/sql/postgresql/buildPostgresqlExtension.nix
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
# PostgreSQL's build system for extensions (PGXS) makes the following assumptions:
|
||||||
|
# - All extensions will be installed in the same prefix as PostgreSQL itself.
|
||||||
|
# - pg_config is able to return the correct paths for bindir/libdir/datadir etc.
|
||||||
|
#
|
||||||
|
# Both of those assumptions break with nix. Since each extension is a separate
|
||||||
|
# derivation, we need to put all its files into a different folder. At the same
|
||||||
|
# time, pg_config only points to the PostgreSQL derivation's paths.
|
||||||
|
#
|
||||||
|
# When building extensions, the paths provided by pg_config are used for two
|
||||||
|
# purposes:
|
||||||
|
# - To find postgres libs and headers and reference those paths via -L and -I flags.
|
||||||
|
# - To determine the correct install directory.
|
||||||
|
#
|
||||||
|
# The PGXS Makefiles also support an environment variable DESTDIR, which is added as
|
||||||
|
# a prefix to all install locations. This is primarily used for temporary installs
|
||||||
|
# while running the test suite. Since pg_config returns absolute paths to /nix/store
|
||||||
|
# for us, using DESTDIR will result in install locations of the form:
|
||||||
|
# $DESTIDR/nix/store/<postgresql-output>/...
|
||||||
|
#
|
||||||
|
# In multiple iterations, the following approaches have been tried to work around all
|
||||||
|
# of this:
|
||||||
|
# 1. For a long time, all extensions in nixpkgs just overwrote the installPhase
|
||||||
|
# and moved the respective files to the correct location manually. This approach
|
||||||
|
# is not maintainable, because whenever upstream adds a new file, we'd have to
|
||||||
|
# make sure the file is correctly installed as well. Additionally, it makes adding
|
||||||
|
# a new extension harder than it should be.
|
||||||
|
#
|
||||||
|
# 2. A wrapper around pg_config could just replace the returned paths with paths to
|
||||||
|
# $out of currently building derivation, i.e. the extension. This works for install-
|
||||||
|
# ation, but breaks for any of the libs and headers the extension needs from postgres
|
||||||
|
# itself.
|
||||||
|
#
|
||||||
|
# 3. A variation of 2., but make the pg_config wrapper only return the changed paths
|
||||||
|
# during the installPahse. During configure and build, it would return the regular
|
||||||
|
# paths to the PostgreSQL derivation. This works better, but not for every case.
|
||||||
|
# Some extensions try to be smarter and search for the "postgres" binary to deduce
|
||||||
|
# the necessary paths from that. Those would still need special handling.
|
||||||
|
#
|
||||||
|
# 4. Use the fact that DESTDIR is prepended to every installation directory - and only
|
||||||
|
# there, to run a replacement of all Makefiles in postgres' lib/pgxs/ folder and
|
||||||
|
# all Makefiles in the extension's source. "$DESTDIR/$bindir" can be replaced with
|
||||||
|
# "$out/bin" etc. - thus mapping the installPhase directly into the right output.
|
||||||
|
# This works beautifully - for the majority of cases. But it doesn't work for
|
||||||
|
# some extensions that use CMake. And it doesn't work for some extensions that use
|
||||||
|
# custom variables instead of the default "bindir" and friends.
|
||||||
|
#
|
||||||
|
# 5. Just set DESTDIR to the extensions's output and then clean up afterward. This will
|
||||||
|
# result in paths like this:
|
||||||
|
# /nix/store/<extension-output>/nix/store/<postgresql-output>/...
|
||||||
|
# Directly after the installPhase, we'll move the files in the right folder.
|
||||||
|
# This seems to work consistently across all extensions we have in nixpkgs right now.
|
||||||
|
# Of course, it would break down for any extension that doesn't support DESTDIR -
|
||||||
|
# but that just means PGXS is not used either, so that's OK.
|
||||||
|
#
|
||||||
|
# This last approach is the one we're taking in this file. To make sure the removal of the
|
||||||
|
# nested nix/store happens immediately after the installPhase, before any other postInstall
|
||||||
|
# hooks run, this needs to be run in an override of `mkDerivation` and not in a setup hook.
|
||||||
|
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
postgresql,
|
||||||
|
}:
|
||||||
|
|
||||||
|
args:
|
||||||
|
|
||||||
|
let
|
||||||
|
buildPostgresqlExtension = finalAttrs: prevAttrs: {
|
||||||
|
buildInputs = [ postgresql ] ++ prevAttrs.buildInputs or [ ];
|
||||||
|
|
||||||
|
installFlags = [
|
||||||
|
"DESTDIR=${placeholder "out"}"
|
||||||
|
] ++ prevAttrs.installFlags or [ ];
|
||||||
|
|
||||||
|
postInstall =
|
||||||
|
''
|
||||||
|
# DESTDIR + pg_config install the files into
|
||||||
|
# /nix/store/<extension>/nix/store/<postgresql>/...
|
||||||
|
# We'll now remove the /nix/store/<postgresql> part:
|
||||||
|
if [[ -d "$out${postgresql}" ]]; then
|
||||||
|
cp -alt "$out" "$out${postgresql}"/*
|
||||||
|
rm -r "$out${postgresql}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d "$out${postgresql.dev}" ]]; then
|
||||||
|
mkdir -p "''${dev:-$out}"
|
||||||
|
cp -alt "''${dev:-$out}" "$out${postgresql.dev}"/*
|
||||||
|
rm -r "$out${postgresql.dev}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d "$out${postgresql.lib}" ]]; then
|
||||||
|
mkdir -p "''${lib:-$out}"
|
||||||
|
cp -alt "''${lib:-$out}" "$out${postgresql.lib}"/*
|
||||||
|
rm -r "$out${postgresql.lib}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d "$out${postgresql.doc}" ]]; then
|
||||||
|
mkdir -p "''${doc:-$out}"
|
||||||
|
cp -alt "''${doc:-$out}" "$out${postgresql.doc}"/*
|
||||||
|
rm -r "$out${postgresql.doc}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d "$out${postgresql.man}" ]]; then
|
||||||
|
mkdir -p "''${man:-$out}"
|
||||||
|
cp -alt "''${man:-$out}" "$out${postgresql.man}"/*
|
||||||
|
rm -r "$out${postgresql.man}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# In some cases (postgis) parts of the install script
|
||||||
|
# actually work "OK", before we add DESTDIR, so some
|
||||||
|
# files end up in
|
||||||
|
# /nix/store/<extension>/nix/store/<extension>/...
|
||||||
|
if [[ -d "$out$out" ]]; then
|
||||||
|
cp -alt "$out" "$out$out"/*
|
||||||
|
rm -r "$out$out"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d "$out/nix/store" ]]; then
|
||||||
|
if ! rmdir "$out/nix/store" "$out/nix"; then
|
||||||
|
find "$out/nix"
|
||||||
|
nixErrorLog 'Found left-overs in $out/nix/store, make sure to move them into $out properly.'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
''
|
||||||
|
+ prevAttrs.postInstall or "";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation (lib.extends buildPostgresqlExtension (lib.toFunction args))
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, bison, fetchFromGitHub, flex, perl, postgresql }:
|
{ lib, stdenv, bison, fetchFromGitHub, flex, perl, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
let
|
let
|
||||||
hashes = {
|
hashes = {
|
||||||
|
@ -11,7 +11,7 @@ let
|
||||||
"12" = "sha256-JFNk17ESsIt20dwXrfBkQ5E6DbZzN/Q9eS6+WjCXGd4=";
|
"12" = "sha256-JFNk17ESsIt20dwXrfBkQ5E6DbZzN/Q9eS6+WjCXGd4=";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "age";
|
pname = "age";
|
||||||
version = "1.5.0-rc0";
|
version = "1.5.0-rc0";
|
||||||
|
|
||||||
|
@ -22,20 +22,12 @@ stdenv.mkDerivation rec {
|
||||||
hash = hashes.${lib.versions.major postgresql.version} or (throw "Source for Age is not available for ${postgresql.version}");
|
hash = hashes.${lib.versions.major postgresql.version} or (throw "Source for Age is not available for ${postgresql.version}");
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"BISON=${bison}/bin/bison"
|
"BISON=${bison}/bin/bison"
|
||||||
"FLEX=${flex}/bin/flex"
|
"FLEX=${flex}/bin/flex"
|
||||||
"PERL=${perl}/bin/perl"
|
"PERL=${perl}/bin/perl"
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib *${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension *.sql
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.tests = stdenv.mkDerivation {
|
passthru.tests = stdenv.mkDerivation {
|
||||||
inherit version src;
|
inherit version src;
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,16 @@
|
||||||
{ lib, stdenv, pg-dump-anon, postgresql, runtimeShell, jitSupport, llvm }:
|
{ lib, stdenv, pg-dump-anon, postgresql, runtimeShell, jitSupport, llvm, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
buildPostgresqlExtension (finalAttrs: {
|
||||||
pname = "postgresql_anonymizer";
|
pname = "postgresql_anonymizer";
|
||||||
|
|
||||||
inherit (pg-dump-anon) version src passthru;
|
inherit (pg-dump-anon) version src passthru;
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
nativeBuildInputs = [ postgresql ] ++ lib.optional jitSupport llvm;
|
nativeBuildInputs = [ postgresql ] ++ lib.optional jitSupport llvm;
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
makeFlags = [
|
# Needs to be after postInstall, where removeNestedNixStore runs
|
||||||
"BINDIR=${placeholder "out"}/bin"
|
preFixup = ''
|
||||||
"datadir=${placeholder "out"}/share/postgresql"
|
|
||||||
"pkglibdir=${placeholder "out"}/lib"
|
|
||||||
"DESTDIR="
|
|
||||||
];
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
cat >$out/bin/pg_dump_anon.sh <<'EOF'
|
cat >$out/bin/pg_dump_anon.sh <<'EOF'
|
||||||
#!${runtimeShell}
|
#!${runtimeShell}
|
||||||
echo "This script is deprecated by upstream. To use the new script,"
|
echo "This script is deprecated by upstream. To use the new script,"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, lib, fetchFromGitHub, postgresql, boost182, nixosTests }:
|
{ stdenv, lib, fetchFromGitHub, postgresql, boost182, nixosTests, buildPostgresqlExtension }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "1.7.0";
|
version = "1.7.0";
|
||||||
|
@ -20,7 +20,7 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
buildPostgresqlExtension {
|
||||||
pname = "apache_datasketches";
|
pname = "apache_datasketches";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
sourceRoot = main_src.name;
|
sourceRoot = main_src.name;
|
||||||
|
|
||||||
buildInputs = [ postgresql boost182 ];
|
buildInputs = [ boost182 ];
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
runHook prePatch
|
runHook prePatch
|
||||||
|
@ -36,31 +36,6 @@ stdenv.mkDerivation {
|
||||||
runHook postPatch
|
runHook postPatch
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
install -D -m 644 ./datasketches${postgresql.dlSuffix} -t $out/lib/
|
|
||||||
cat \
|
|
||||||
sql/datasketches_cpc_sketch.sql \
|
|
||||||
sql/datasketches_kll_float_sketch.sql \
|
|
||||||
sql/datasketches_kll_double_sketch.sql \
|
|
||||||
sql/datasketches_theta_sketch.sql \
|
|
||||||
sql/datasketches_frequent_strings_sketch.sql \
|
|
||||||
sql/datasketches_hll_sketch.sql \
|
|
||||||
sql/datasketches_aod_sketch.sql \
|
|
||||||
sql/datasketches_req_float_sketch.sql \
|
|
||||||
sql/datasketches_quantiles_double_sketch.sql \
|
|
||||||
> sql/datasketches--${version}.sql
|
|
||||||
install -D -m 644 ./datasketches.control -t $out/share/postgresql/extension
|
|
||||||
install -D -m 644 \
|
|
||||||
./sql/datasketches--${version}.sql \
|
|
||||||
./sql/datasketches--1.3.0--1.4.0.sql \
|
|
||||||
./sql/datasketches--1.4.0--1.5.0.sql \
|
|
||||||
./sql/datasketches--1.5.0--1.6.0.sql \
|
|
||||||
./sql/datasketches--1.6.0--1.7.0.sql \
|
|
||||||
-t $out/share/postgresql/extension
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.tests.apache_datasketches = nixosTests.apache_datasketches;
|
passthru.tests.apache_datasketches = nixosTests.apache_datasketches;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -4,9 +4,10 @@
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, lz4
|
, lz4
|
||||||
, postgresql
|
, postgresql
|
||||||
|
, buildPostgresqlExtension
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "citus";
|
pname = "citus";
|
||||||
version = "12.1.2";
|
version = "12.1.2";
|
||||||
|
|
||||||
|
@ -20,23 +21,8 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
curl
|
curl
|
||||||
lz4
|
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; {
|
meta = with lib; {
|
||||||
# "Our soft policy for Postgres version compatibility is to support Citus'
|
# "Our soft policy for Postgres version compatibility is to support Citus'
|
||||||
# latest release with Postgres' 3 latest releases."
|
# latest release with Postgres' 3 latest releases."
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql, protobufc }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, protobufc, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "cstore_fdw";
|
pname = "cstore_fdw";
|
||||||
version = "unstable-2022-03-08";
|
version = "unstable-2022-03-08";
|
||||||
|
|
||||||
nativeBuildInputs = [ protobufc ];
|
nativeBuildInputs = [ protobufc ];
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "citusdata";
|
owner = "citusdata";
|
||||||
|
@ -14,14 +13,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-02wcCqs8A5ZOZX080fgcNJTQrYQctnlwnA8+YPaRTZc=";
|
sha256 = "sha256-02wcCqs8A5ZOZX080fgcNJTQrYQctnlwnA8+YPaRTZc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/{lib,share/postgresql/extension}
|
|
||||||
|
|
||||||
cp *.so $out/lib
|
|
||||||
cp *.sql $out/share/postgresql/extension
|
|
||||||
cp *.control $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
broken = versionAtLeast postgresql.version "14";
|
broken = versionAtLeast postgresql.version "14";
|
||||||
description = "Columnar storage for PostgreSQL";
|
description = "Columnar storage for PostgreSQL";
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
, h3_4
|
, h3_4
|
||||||
, postgresql
|
, postgresql
|
||||||
, postgresqlTestExtension
|
, postgresqlTestExtension
|
||||||
|
, buildPostgresqlExtension
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
buildPostgresqlExtension (finalAttrs: {
|
||||||
pname = "h3-pg";
|
pname = "h3-pg";
|
||||||
version = "4.1.3";
|
version = "4.1.3";
|
||||||
|
|
||||||
|
@ -32,16 +33,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
h3_4
|
h3_4
|
||||||
postgresql
|
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib h3/h3.so
|
|
||||||
install -D -t $out/share/postgresql/extension h3/h3-*.sql h3/h3.control
|
|
||||||
install -D -t $out/lib h3_postgis/h3_postgis.so
|
|
||||||
install -D -t $out/share/postgresql/extension h3_postgis/h3_postgis-*.sql h3_postgis/h3_postgis.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.tests.extension = postgresqlTestExtension {
|
passthru.tests.extension = postgresqlTestExtension {
|
||||||
inherit (finalAttrs) finalPackage;
|
inherit (finalAttrs) finalPackage;
|
||||||
withPackages = [ "postgis" ];
|
withPackages = [ "postgis" ];
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql, gitUpdater }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, gitUpdater, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "hypopg";
|
pname = "hypopg";
|
||||||
version = "1.4.1";
|
version = "1.4.1";
|
||||||
|
|
||||||
|
@ -11,14 +11,6 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-88uKPSnITRZ2VkelI56jZ9GWazG/Rn39QlyHKJKSKMM=";
|
hash = "sha256-88uKPSnITRZ2VkelI56jZ9GWazG/Rn39QlyHKJKSKMM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib *${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
install -D -t $out/share/postgresql/extension *.sql
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
updateScript = gitUpdater {
|
updateScript = gitUpdater {
|
||||||
ignoredVersions = "beta";
|
ignoredVersions = "beta";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "jsonb_deep_sum";
|
pname = "jsonb_deep_sum";
|
||||||
version = "unstable-2021-12-24";
|
version = "unstable-2021-12-24";
|
||||||
|
|
||||||
|
@ -11,16 +11,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-W1wNILAwTAjFPezq+grdRMA59KEnMZDz69n9xQUqdc0=";
|
sha256 = "sha256-W1wNILAwTAjFPezq+grdRMA59KEnMZDz69n9xQUqdc0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/{lib,share/postgresql/extension}
|
|
||||||
|
|
||||||
cp *${postgresql.dlSuffix} $out/lib
|
|
||||||
cp *.sql $out/share/postgresql/extension
|
|
||||||
cp *.control $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "PostgreSQL extension to easily add jsonb numeric";
|
description = "PostgreSQL extension to easily add jsonb numeric";
|
||||||
homepage = "https://github.com/furstenheim/jsonb_deep_sum";
|
homepage = "https://github.com/furstenheim/jsonb_deep_sum";
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
, openssl
|
, openssl
|
||||||
, postgresql
|
, postgresql
|
||||||
, postgresqlTestExtension
|
, postgresqlTestExtension
|
||||||
|
, buildPostgresqlExtension
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
buildPostgresqlExtension (finalAttrs: {
|
||||||
pname = "postgresql-lantern";
|
pname = "postgresql-lantern";
|
||||||
version = "0.4.1";
|
version = "0.4.1";
|
||||||
|
|
||||||
|
@ -29,19 +30,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
openssl
|
openssl
|
||||||
postgresql
|
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
install -D -t $out/lib lantern${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension lantern-*.sql
|
|
||||||
install -D -t $out/share/postgresql/extension lantern.control
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DBUILD_FOR_DISTRIBUTING=ON"
|
"-DBUILD_FOR_DISTRIBUTING=ON"
|
||||||
"-S ../lantern_hnsw"
|
"-S ../lantern_hnsw"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "periods";
|
pname = "periods";
|
||||||
version = "1.2.2";
|
version = "1.2.2";
|
||||||
|
|
||||||
|
@ -11,14 +11,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-ezt+MtDqPM8OmJCD6oQTS644l+XHZoxuivq0PUIXOY8=";
|
sha256 = "sha256-ezt+MtDqPM8OmJCD6oQTS644l+XHZoxuivq0PUIXOY8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib *${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension *.sql
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "PostgreSQL extension implementing SQL standard functionality for PERIODs and SYSTEM VERSIONING";
|
description = "PostgreSQL extension implementing SQL standard functionality for PERIODs and SYSTEM VERSIONING";
|
||||||
homepage = "https://github.com/xocolatl/periods";
|
homepage = "https://github.com/xocolatl/periods";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pg_auto_failover";
|
pname = "pg_auto_failover";
|
||||||
version = "2.1";
|
version = "2.1";
|
||||||
|
|
||||||
|
@ -11,14 +11,7 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-OIWykfFbVskrkPG/zSmZtZjc+W956KSfIzK7f5QOqpI=";
|
sha256 = "sha256-OIWykfFbVskrkPG/zSmZtZjc+W956KSfIzK7f5QOqpI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = postgresql.buildInputs ++ [ postgresql ];
|
buildInputs = postgresql.buildInputs;
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/bin src/bin/pg_autoctl/pg_autoctl
|
|
||||||
install -D -t $out/lib src/monitor/pgautofailover.so
|
|
||||||
install -D -t $out/share/postgresql/extension src/monitor/*.sql
|
|
||||||
install -D -t $out/share/postgresql/extension src/monitor/pgautofailover.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "PostgreSQL extension and service for automated failover and high-availability";
|
description = "PostgreSQL extension and service for automated failover and high-availability";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, fetchpatch, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pg_bigm";
|
pname = "pg_bigm";
|
||||||
version = "1.2-20200228";
|
version = "1.2-20200228";
|
||||||
|
|
||||||
|
@ -19,16 +19,8 @@ stdenv.mkDerivation rec {
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
makeFlags = [ "USE_PGXS=1" ];
|
makeFlags = [ "USE_PGXS=1" ];
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib pg_bigm${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension *.sql
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Text similarity measurement and index searching based on bigrams";
|
description = "Text similarity measurement and index searching based on bigrams";
|
||||||
homepage = "https://pgbigm.osdn.jp/";
|
homepage = "https://pgbigm.osdn.jp/";
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pg_cron";
|
pname = "pg_cron";
|
||||||
version = "1.6.4";
|
version = "1.6.4";
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "citusdata";
|
owner = "citusdata";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
|
@ -13,14 +11,6 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-t1DpFkPiSfdoGG2NgNT7g1lkvSooZoRoUrix6cBID40=";
|
hash = "sha256-t1DpFkPiSfdoGG2NgNT7g1lkvSooZoRoUrix6cBID40=";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/{lib,share/postgresql/extension}
|
|
||||||
|
|
||||||
cp *${postgresql.dlSuffix} $out/lib
|
|
||||||
cp *.sql $out/share/postgresql/extension
|
|
||||||
cp *.control $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Run Cron jobs through PostgreSQL";
|
description = "Run Cron jobs through PostgreSQL";
|
||||||
homepage = "https://github.com/citusdata/pg_cron";
|
homepage = "https://github.com/citusdata/pg_cron";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitLab, postgresql }:
|
{ lib, stdenv, fetchFromGitLab, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pg_ed25519";
|
pname = "pg_ed25519";
|
||||||
version = "0.2";
|
version = "0.2";
|
||||||
src = fetchFromGitLab {
|
src = fetchFromGitLab {
|
||||||
|
@ -10,17 +10,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "16w3qx3wj81bzfhydl2pjhn8b1jak6h7ja9wq1kc626g0siggqi0";
|
sha256 = "16w3qx3wj81bzfhydl2pjhn8b1jak6h7ja9wq1kc626g0siggqi0";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin # For buildEnv to setup proper symlinks. See #22653
|
|
||||||
mkdir -p $out/{lib,share/postgresql/extension}
|
|
||||||
|
|
||||||
cp *.so $out/lib
|
|
||||||
cp *.sql $out/share/postgresql/extension
|
|
||||||
cp *.control $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "PostgreSQL extension for signing and verifying ed25519 signatures";
|
description = "PostgreSQL extension for signing and verifying ed25519 signatures";
|
||||||
homepage = "https://gitlab.com/dwagin/pg_ed25519";
|
homepage = "https://gitlab.com/dwagin/pg_ed25519";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pg_embedding";
|
pname = "pg_embedding";
|
||||||
version = "0.3.6";
|
version = "0.3.6";
|
||||||
|
|
||||||
|
@ -11,14 +11,6 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-NTBxsQB8mR7e/CWwkCEyDiYhi3Nxl/aKgRBwqc0THcI=";
|
hash = "sha256-NTBxsQB8mR7e/CWwkCEyDiYhi3Nxl/aKgRBwqc0THcI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib *.so
|
|
||||||
install -D -t $out/share/postgresql/extension *.sql
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "PostgreSQL extension implementing the HNSW algorithm for vector similarity search";
|
description = "PostgreSQL extension implementing the HNSW algorithm for vector similarity search";
|
||||||
homepage = "https://github.com/neondatabase/pg_embedding";
|
homepage = "https://github.com/neondatabase/pg_embedding";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
let
|
let
|
||||||
source = {
|
source = {
|
||||||
|
@ -28,7 +28,7 @@ let
|
||||||
};
|
};
|
||||||
}.${lib.versions.major postgresql.version} or (throw "Source for pg_hint_plan is not available for ${postgresql.version}");
|
}.${lib.versions.major postgresql.version} or (throw "Source for pg_hint_plan is not available for ${postgresql.version}");
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
buildPostgresqlExtension {
|
||||||
pname = "pg_hint_plan";
|
pname = "pg_hint_plan";
|
||||||
inherit (source) version;
|
inherit (source) version;
|
||||||
|
|
||||||
|
@ -44,14 +44,6 @@ stdenv.mkDerivation {
|
||||||
substituteInPlace Makefile --replace "LDFLAGS+=-Wl,--build-id" ""
|
substituteInPlace Makefile --replace "LDFLAGS+=-Wl,--build-id" ""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib pg_hint_plan${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension *.sql
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Extension to tweak PostgreSQL execution plans using so-called 'hints' in SQL comments";
|
description = "Extension to tweak PostgreSQL execution plans using so-called 'hints' in SQL comments";
|
||||||
homepage = "https://github.com/ossc-db/pg_hint_plan";
|
homepage = "https://github.com/ossc-db/pg_hint_plan";
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pg_hll";
|
pname = "pg_hll";
|
||||||
version = "2.18";
|
version = "2.18";
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "citusdata";
|
owner = "citusdata";
|
||||||
repo = "postgresql-hll";
|
repo = "postgresql-hll";
|
||||||
|
@ -13,12 +11,6 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-Latdxph1Ura8yKEokEjalJ+/GY+pAKOT3GXjuLprj6c=";
|
hash = "sha256-Latdxph1Ura8yKEokEjalJ+/GY+pAKOT3GXjuLprj6c=";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib hll${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension *.sql
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "HyperLogLog for PostgreSQL";
|
description = "HyperLogLog for PostgreSQL";
|
||||||
homepage = "https://github.com/citusdata/postgresql-hll";
|
homepage = "https://github.com/citusdata/postgresql-hll";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pg_ivm";
|
pname = "pg_ivm";
|
||||||
version = "1.9";
|
version = "1.9";
|
||||||
|
|
||||||
|
@ -11,14 +11,6 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-Qcie7sbXcMbQkMoFIYBfttmvlYooESdSk2DyebHKPlk=";
|
hash = "sha256-Qcie7sbXcMbQkMoFIYBfttmvlYooESdSk2DyebHKPlk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib pg_ivm${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension *.sql
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Materialized views with IVM (Incremental View Maintenance) for PostgreSQL";
|
description = "Materialized views with IVM (Incremental View Maintenance) for PostgreSQL";
|
||||||
homepage = "https://github.com/sraoss/pg_ivm";
|
homepage = "https://github.com/sraoss/pg_ivm";
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, postgresql
|
, postgresql
|
||||||
, libversion
|
, libversion
|
||||||
|
, buildPostgresqlExtension
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
buildPostgresqlExtension (finalAttrs: {
|
||||||
pname = "pg_libversion";
|
pname = "pg_libversion";
|
||||||
version = "2.0.1";
|
version = "2.0.1";
|
||||||
|
|
||||||
|
@ -23,20 +24,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
postgresql
|
|
||||||
libversion
|
libversion
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
install -D -t $out/lib libversion${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension *.sql
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.updateScript = gitUpdater { };
|
passthru.updateScript = gitUpdater { };
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, curl, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, curl, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pg_net";
|
pname = "pg_net";
|
||||||
version = "0.8.0";
|
version = "0.8.0";
|
||||||
|
|
||||||
buildInputs = [ curl postgresql ];
|
buildInputs = [ curl ];
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "supabase";
|
owner = "supabase";
|
||||||
|
@ -15,14 +15,6 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = "-Wno-error";
|
env.NIX_CFLAGS_COMPILE = "-Wno-error";
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/{lib,share/postgresql/extension}
|
|
||||||
|
|
||||||
cp *${postgresql.dlSuffix} $out/lib
|
|
||||||
cp sql/*.sql $out/share/postgresql/extension
|
|
||||||
cp *.control $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Async networking for Postgres";
|
description = "Async networking for Postgres";
|
||||||
homepage = "https://github.com/supabase/pg_net";
|
homepage = "https://github.com/supabase/pg_net";
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pg_partman";
|
pname = "pg_partman";
|
||||||
version = "5.1.0";
|
version = "5.1.0";
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "pgpartman";
|
owner = "pgpartman";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
|
@ -13,15 +11,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-GrVOJ5ywZMyqyDroYDLdKkXDdIJSDGhDfveO/ZvrmYs=";
|
sha256 = "sha256-GrVOJ5ywZMyqyDroYDLdKkXDdIJSDGhDfveO/ZvrmYs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/{lib,share/postgresql/extension}
|
|
||||||
|
|
||||||
cp src/*${postgresql.dlSuffix} $out/lib
|
|
||||||
cp updates/* $out/share/postgresql/extension
|
|
||||||
cp -r sql/* $out/share/postgresql/extension
|
|
||||||
cp *.control $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Partition management extension for PostgreSQL";
|
description = "Partition management extension for PostgreSQL";
|
||||||
homepage = "https://github.com/pgpartman/pg_partman";
|
homepage = "https://github.com/pgpartman/pg_partman";
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, lib
|
, lib
|
||||||
, postgresql
|
, postgresql
|
||||||
|
, buildPostgresqlExtension
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pg_rational";
|
pname = "pg_rational";
|
||||||
version = "0.0.2";
|
version = "0.0.2";
|
||||||
|
|
||||||
|
@ -15,20 +16,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-Sp5wuX2nP3KGyWw7MFa11rI1CPIKIWBt8nvBSsASIEw=";
|
sha256 = "sha256-Sp5wuX2nP3KGyWw7MFa11rI1CPIKIWBt8nvBSsASIEw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
mkdir -p $out/{lib,share/postgresql/extension}
|
|
||||||
|
|
||||||
cp *${postgresql.dlSuffix} $out/lib
|
|
||||||
cp *.sql $out/share/postgresql/extension
|
|
||||||
cp *.control $out/share/postgresql/extension
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Precise fractional arithmetic for PostgreSQL";
|
description = "Precise fractional arithmetic for PostgreSQL";
|
||||||
homepage = "https://github.com/begriffs/pg_rational";
|
homepage = "https://github.com/begriffs/pg_rational";
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pg_relusage";
|
pname = "pg_relusage";
|
||||||
version = "0.0.1";
|
version = "0.0.1";
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "adept";
|
owner = "adept";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
|
@ -13,12 +11,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "8hJNjQ9MaBk3J9a73l+yQMwMW/F2N8vr5PO2o+5GvYs=";
|
sha256 = "8hJNjQ9MaBk3J9a73l+yQMwMW/F2N8vr5PO2o+5GvYs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib *${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension *.sql
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "pg_relusage extension for PostgreSQL: discover and log the relations used in your statements";
|
description = "pg_relusage extension for PostgreSQL: discover and log the relations used in your statements";
|
||||||
homepage = "https://github.com/adept/pg_relusage";
|
homepage = "https://github.com/adept/pg_relusage";
|
||||||
|
|
|
@ -4,13 +4,14 @@
|
||||||
, postgresql
|
, postgresql
|
||||||
, postgresqlTestExtension
|
, postgresqlTestExtension
|
||||||
, testers
|
, testers
|
||||||
|
, buildPostgresqlExtension
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
buildPostgresqlExtension (finalAttrs: {
|
||||||
pname = "pg_repack";
|
pname = "pg_repack";
|
||||||
version = "1.5.0";
|
version = "1.5.0";
|
||||||
|
|
||||||
buildInputs = postgresql.buildInputs ++ [ postgresql ];
|
buildInputs = postgresql.buildInputs;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "reorg";
|
owner = "reorg";
|
||||||
|
@ -19,12 +20,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
sha256 = "sha256-do80phyMxwcRIkYyUt9z02z7byNQhK+pbSaCUmzG+4c=";
|
sha256 = "sha256-do80phyMxwcRIkYyUt9z02z7byNQhK+pbSaCUmzG+4c=";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D bin/pg_repack -t $out/bin/
|
|
||||||
install -D lib/pg_repack${postgresql.dlSuffix} -t $out/lib/
|
|
||||||
install -D lib/{pg_repack--${finalAttrs.version}.sql,pg_repack.control} -t $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.tests = {
|
passthru.tests = {
|
||||||
version = testers.testVersion {
|
version = testers.testVersion {
|
||||||
package = finalAttrs.finalPackage;
|
package = finalAttrs.finalPackage;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql, postgresqlTestHook }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, postgresqlTestHook, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
buildPostgresqlExtension (finalAttrs: {
|
||||||
pname = "pg_roaringbitmap";
|
pname = "pg_roaringbitmap";
|
||||||
version = "0.5.4";
|
version = "0.5.4";
|
||||||
|
|
||||||
|
@ -11,16 +11,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
hash = "sha256-E6vqawnsRsAIajGDgJcTUWV1H8GFFboTjhmVfemUGbs=";
|
hash = "sha256-E6vqawnsRsAIajGDgJcTUWV1H8GFFboTjhmVfemUGbs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
postgresql
|
|
||||||
];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib roaringbitmap${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension roaringbitmap-*.sql
|
|
||||||
install -D -t $out/share/postgresql/extension roaringbitmap.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "RoaringBitmap extension for PostgreSQL";
|
description = "RoaringBitmap extension for PostgreSQL";
|
||||||
homepage = "https://github.com/ChenHuajun/pg_roaringbitmap";
|
homepage = "https://github.com/ChenHuajun/pg_roaringbitmap";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
with {
|
with {
|
||||||
"12" = {
|
"12" = {
|
||||||
|
@ -27,12 +27,10 @@ with {
|
||||||
};
|
};
|
||||||
}."${lib.versions.major postgresql.version}" or (throw "pg_safeupdate: version specification for pg ${postgresql.version} missing.");
|
}."${lib.versions.major postgresql.version}" or (throw "pg_safeupdate: version specification for pg ${postgresql.version} missing.");
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pg-safeupdate";
|
pname = "pg-safeupdate";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "eradman";
|
owner = "eradman";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
|
@ -40,10 +38,6 @@ stdenv.mkDerivation rec {
|
||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D safeupdate${postgresql.dlSuffix} -t $out/lib
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Simple extension to PostgreSQL that requires criteria for UPDATE and DELETE";
|
description = "Simple extension to PostgreSQL that requires criteria for UPDATE and DELETE";
|
||||||
homepage = "https://github.com/eradman/pg-safeupdate";
|
homepage = "https://github.com/eradman/pg-safeupdate";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ stdenv, lib, fetchFromGitHub, fetchpatch, postgresql, unstableGitUpdater }:
|
{ stdenv, lib, fetchFromGitHub, fetchpatch, postgresql, unstableGitUpdater, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
buildPostgresqlExtension {
|
||||||
pname = "pg_similarity";
|
pname = "pg_similarity";
|
||||||
version = "1.0-unstable-2021-01-12";
|
version = "1.0-unstable-2021-01-12";
|
||||||
|
|
||||||
|
@ -21,15 +21,8 @@ stdenv.mkDerivation {
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
makeFlags = [ "USE_PGXS=1" ];
|
makeFlags = [ "USE_PGXS=1" ];
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D pg_similarity${postgresql.dlSuffix} -t $out/lib/
|
|
||||||
install -D ./{pg_similarity--unpackaged--1.0.sql,pg_similarity--1.0.sql,pg_similarity.control} -t $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.updateScript = unstableGitUpdater {};
|
passthru.updateScript = unstableGitUpdater {};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql, postgresqlTestExtension }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, postgresqlTestExtension, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
buildPostgresqlExtension (finalAttrs: {
|
||||||
pname = "pg_squeeze";
|
pname = "pg_squeeze";
|
||||||
version = "1.7.0";
|
version = "1.7.0";
|
||||||
|
|
||||||
|
@ -11,20 +11,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
hash = "sha256-Kh1wSOvV5Rd1CG/na3yzbWzvaR8SJ6wmTZOnM+lbgik=";
|
hash = "sha256-Kh1wSOvV5Rd1CG/na3yzbWzvaR8SJ6wmTZOnM+lbgik=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
postgresql
|
|
||||||
];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
install -D -t $out/lib pg_squeeze${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension pg_squeeze-*.sql
|
|
||||||
install -D -t $out/share/postgresql/extension pg_squeeze.control
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.tests.extension = postgresqlTestExtension {
|
passthru.tests.extension = postgresqlTestExtension {
|
||||||
inherit (finalAttrs) finalPackage;
|
inherit (finalAttrs) finalPackage;
|
||||||
postgresqlExtraSettings = ''
|
postgresqlExtraSettings = ''
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pg_topn";
|
pname = "pg_topn";
|
||||||
version = "2.7.0";
|
version = "2.7.0";
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "citusdata";
|
owner = "citusdata";
|
||||||
repo = "postgresql-topn";
|
repo = "postgresql-topn";
|
||||||
|
@ -13,14 +11,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-lP6Iil/BUv4ga+co+oBpKv1FBqFuBGfNjueEolM6png=";
|
sha256 = "sha256-lP6Iil/BUv4ga+co+oBpKv1FBqFuBGfNjueEolM6png=";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/{lib,share/postgresql/extension}
|
|
||||||
|
|
||||||
cp *${postgresql.dlSuffix} $out/lib
|
|
||||||
cp *.sql $out/share/postgresql/extension
|
|
||||||
cp *.control $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Efficient querying of 'top values' for PostgreSQL";
|
description = "Efficient querying of 'top values' for PostgreSQL";
|
||||||
homepage = "https://github.com/citusdata/postgresql-topn";
|
homepage = "https://github.com/citusdata/postgresql-topn";
|
||||||
|
|
|
@ -2,14 +2,13 @@
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, postgresql
|
, postgresql
|
||||||
|
, buildPostgresqlExtension
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pg_uuidv7";
|
pname = "pg_uuidv7";
|
||||||
version = "1.5.0";
|
version = "1.5.0";
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "fboulnois";
|
owner = "fboulnois";
|
||||||
repo = "pg_uuidv7";
|
repo = "pg_uuidv7";
|
||||||
|
@ -17,11 +16,6 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-oVyRtjl3KsD3j96qvQb8bFLMhoWO81OudOL4wVXrjzI=";
|
hash = "sha256-oVyRtjl3KsD3j96qvQb8bFLMhoWO81OudOL4wVXrjzI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib pg_uuidv7${postgresql.dlSuffix}
|
|
||||||
install -D {sql/pg_uuidv7--${lib.versions.majorMinor version}.sql,pg_uuidv7.control} -t $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Tiny Postgres extension to create version 7 UUIDs";
|
description = "Tiny Postgres extension to create version 7 UUIDs";
|
||||||
homepage = "https://github.com/fboulnois/pg_uuidv7";
|
homepage = "https://github.com/fboulnois/pg_uuidv7";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, libkrb5, openssl, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, libkrb5, openssl, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
let
|
let
|
||||||
source = {
|
source = {
|
||||||
|
@ -28,7 +28,7 @@ let
|
||||||
};
|
};
|
||||||
}.${lib.versions.major postgresql.version} or (throw "Source for pgaudit is not available for ${postgresql.version}");
|
}.${lib.versions.major postgresql.version} or (throw "Source for pgaudit is not available for ${postgresql.version}");
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
buildPostgresqlExtension {
|
||||||
pname = "pgaudit";
|
pname = "pgaudit";
|
||||||
inherit (source) version;
|
inherit (source) version;
|
||||||
|
|
||||||
|
@ -39,16 +39,10 @@ stdenv.mkDerivation {
|
||||||
hash = source.hash;
|
hash = source.hash;
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ libkrb5 openssl postgresql ];
|
buildInputs = [ libkrb5 openssl ];
|
||||||
|
|
||||||
makeFlags = [ "USE_PGXS=1" ];
|
makeFlags = [ "USE_PGXS=1" ];
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib pgaudit${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension *.sql
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Open Source PostgreSQL Audit Logging";
|
description = "Open Source PostgreSQL Audit Logging";
|
||||||
homepage = "https://github.com/pgaudit/pgaudit";
|
homepage = "https://github.com/pgaudit/pgaudit";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql, unstableGitUpdater, nixosTests, postgresqlTestExtension }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, unstableGitUpdater, nixosTests, postgresqlTestExtension, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
buildPostgresqlExtension (finalAttrs: {
|
||||||
pname = "pgjwt";
|
pname = "pgjwt";
|
||||||
version = "0-unstable-2023-03-02";
|
version = "0-unstable-2023-03-02";
|
||||||
|
|
||||||
|
@ -11,12 +11,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
sha256 = "sha256-nDZEDf5+sFc1HDcG2eBNQj+kGcdAYRXJseKi9oww+JU=";
|
sha256 = "sha256-nDZEDf5+sFc1HDcG2eBNQj+kGcdAYRXJseKi9oww+JU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
dontBuild = true;
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/share/postgresql/extension
|
|
||||||
cp pg*sql *.control $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.updateScript = unstableGitUpdater { };
|
passthru.updateScript = unstableGitUpdater { };
|
||||||
|
|
||||||
passthru.tests = {
|
passthru.tests = {
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
stdenv,
|
stdenv,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
postgresql,
|
postgresql,
|
||||||
|
buildPostgresqlExtension,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pgmq";
|
pname = "pgmq";
|
||||||
version = "1.4.4";
|
version = "1.4.4";
|
||||||
|
|
||||||
|
@ -20,17 +21,6 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
install -D -t $out/share/postgresql/extension sql/*.sql
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Lightweight message queue like AWS SQS and RSMQ but on Postgres";
|
description = "Lightweight message queue like AWS SQS and RSMQ but on Postgres";
|
||||||
homepage = "https://tembo.io/pgmq";
|
homepage = "https://tembo.io/pgmq";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchurl, pkg-config, postgresql, msgpack-c, groonga }:
|
{ lib, stdenv, fetchurl, pkg-config, postgresql, msgpack-c, groonga, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pgroonga";
|
pname = "pgroonga";
|
||||||
version = "3.2.3";
|
version = "3.2.3";
|
||||||
|
|
||||||
|
@ -10,23 +10,13 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ postgresql msgpack-c groonga ];
|
buildInputs = [ msgpack-c groonga ];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"HAVE_MSGPACK=1"
|
"HAVE_MSGPACK=1"
|
||||||
"MSGPACK_PACKAGE_NAME=msgpack-c"
|
"MSGPACK_PACKAGE_NAME=msgpack-c"
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D pgroonga${postgresql.dlSuffix} -t $out/lib/
|
|
||||||
install -D pgroonga.control -t $out/share/postgresql/extension
|
|
||||||
install -D data/pgroonga-*.sql -t $out/share/postgresql/extension
|
|
||||||
|
|
||||||
install -D pgroonga_database${postgresql.dlSuffix} -t $out/lib/
|
|
||||||
install -D pgroonga_database.control -t $out/share/postgresql/extension
|
|
||||||
install -D data/pgroonga_database-*.sql -t $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "PostgreSQL extension to use Groonga as the index";
|
description = "PostgreSQL extension to use Groonga as the index";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql, perl, cmake, boost }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, perl, cmake, boost, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pgrouting";
|
pname = "pgrouting";
|
||||||
version = "3.6.3";
|
version = "3.6.3";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake perl ];
|
nativeBuildInputs = [ cmake perl ];
|
||||||
buildInputs = [ postgresql boost ];
|
buildInputs = [ boost ];
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "pgRouting";
|
owner = "pgRouting";
|
||||||
|
@ -14,12 +14,6 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-VCoapUM7Vh4W1DUE/gWQ9YIRLbw63XlOWsgajJW+XNU=";
|
hash = "sha256-VCoapUM7Vh4W1DUE/gWQ9YIRLbw63XlOWsgajJW+XNU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D lib/*.so -t $out/lib
|
|
||||||
install -D sql/pgrouting--${version}.sql -t $out/share/postgresql/extension
|
|
||||||
install -D sql/common/pgrouting.control -t $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "PostgreSQL/PostGIS extension that provides geospatial routing functionality";
|
description = "PostgreSQL/PostGIS extension that provides geospatial routing functionality";
|
||||||
homepage = "https://pgrouting.org/";
|
homepage = "https://pgrouting.org/";
|
||||||
|
|
|
@ -4,9 +4,10 @@
|
||||||
, libsodium
|
, libsodium
|
||||||
, postgresql
|
, postgresql
|
||||||
, postgresqlTestExtension
|
, postgresqlTestExtension
|
||||||
|
, buildPostgresqlExtension
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
buildPostgresqlExtension (finalAttrs: {
|
||||||
pname = "pgsodium";
|
pname = "pgsodium";
|
||||||
version = "3.1.9";
|
version = "3.1.9";
|
||||||
|
|
||||||
|
@ -19,20 +20,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libsodium
|
libsodium
|
||||||
postgresql
|
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = ''
|
postInstall = ''
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
install -D -t $out/lib pgsodium${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension sql/pgsodium-*.sql
|
|
||||||
install -D -t $out/share/postgresql/extension pgsodium.control
|
|
||||||
|
|
||||||
install -D -t $out/share/pgsodium/getkey_scripts getkey_scripts/*
|
install -D -t $out/share/pgsodium/getkey_scripts getkey_scripts/*
|
||||||
ln -s $out/share/pgsodium/getkey_scripts/pgsodium_getkey_urandom.sh $out/share/postgresql/extension/pgsodium_getkey
|
ln -s $out/share/pgsodium/getkey_scripts/pgsodium_getkey_urandom.sh $out/share/postgresql/extension/pgsodium_getkey
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.tests.extension = postgresqlTestExtension {
|
passthru.tests.extension = postgresqlTestExtension {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, curl, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, curl, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pgsql-http";
|
pname = "pgsql-http";
|
||||||
version = "1.6.0";
|
version = "1.6.0";
|
||||||
|
|
||||||
|
@ -11,13 +11,7 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-CPHfx7vhWfxkXsoKTzyFuTt47BPMvzi/pi1leGcuD60=";
|
hash = "sha256-CPHfx7vhWfxkXsoKTzyFuTt47BPMvzi/pi1leGcuD60=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ curl postgresql ];
|
buildInputs = [ curl ];
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib *${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension *.sql
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "HTTP client for PostgreSQL, retrieve a web page from inside the database";
|
description = "HTTP client for PostgreSQL, retrieve a web page from inside the database";
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
|
, buildPostgresqlExtension
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, perl
|
, perl
|
||||||
, perlPackages
|
, perlPackages
|
||||||
|
@ -8,7 +9,7 @@
|
||||||
, which
|
, which
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
buildPostgresqlExtension (finalAttrs: {
|
||||||
pname = "pgtap";
|
pname = "pgtap";
|
||||||
version = "1.3.3";
|
version = "1.3.3";
|
||||||
|
|
||||||
|
@ -21,10 +22,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
nativeBuildInputs = [ postgresql perl perlPackages.TAPParserSourceHandlerpgTAP which ];
|
nativeBuildInputs = [ postgresql perl perlPackages.TAPParserSourceHandlerpgTAP which ];
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D {sql/pgtap--${finalAttrs.version}.sql,pgtap.control} -t $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.tests.extension = stdenv.mkDerivation {
|
passthru.tests.extension = stdenv.mkDerivation {
|
||||||
name = "pgtap-test";
|
name = "pgtap-test";
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "pgvector";
|
pname = "pgvector";
|
||||||
version = "0.6.2";
|
version = "0.6.2";
|
||||||
|
|
||||||
|
@ -11,14 +11,6 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-r+TpFJg6WrMn0L2B7RpmSRvw3XxpHzMRtpFWDCzLvgs=";
|
hash = "sha256-r+TpFJg6WrMn0L2B7RpmSRvw3XxpHzMRtpFWDCzLvgs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib vector${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension sql/vector-*.sql
|
|
||||||
install -D -t $out/share/postgresql/extension vector.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Open-source vector similarity search for PostgreSQL";
|
description = "Open-source vector similarity search for PostgreSQL";
|
||||||
homepage = "https://github.com/pgvector/pgvector";
|
homepage = "https://github.com/pgvector/pgvector";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql, postgresqlTestExtension }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, postgresqlTestExtension, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
buildPostgresqlExtension (finalAttrs: {
|
||||||
pname = "plpgsql-check";
|
pname = "plpgsql-check";
|
||||||
version = "2.7.5";
|
version = "2.7.5";
|
||||||
|
|
||||||
|
@ -11,14 +11,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
hash = "sha256-CD/G/wX6o+mC6gowlpFe1DdJWyh3cB9wxSsW2GXrENE=";
|
hash = "sha256-CD/G/wX6o+mC6gowlpFe1DdJWyh3cB9wxSsW2GXrENE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib *${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension *.sql
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.tests.extension = postgresqlTestExtension {
|
passthru.tests.extension = postgresqlTestExtension {
|
||||||
inherit (finalAttrs) finalPackage;
|
inherit (finalAttrs) finalPackage;
|
||||||
sql = "CREATE EXTENSION plpgsql_check;";
|
sql = "CREATE EXTENSION plpgsql_check;";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, pkg-config, R, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, pkg-config, R, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "plr";
|
pname = "plr";
|
||||||
version = "8.4.7";
|
version = "8.4.7";
|
||||||
|
|
||||||
|
@ -12,15 +12,10 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ R postgresql ];
|
buildInputs = [ R ];
|
||||||
|
|
||||||
makeFlags = [ "USE_PGXS=1" ];
|
makeFlags = [ "USE_PGXS=1" ];
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D plr${postgresql.dlSuffix} -t $out/lib/
|
|
||||||
install -D {plr--*.sql,plr.control} -t $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "PL/R - R Procedural Language for PostgreSQL";
|
description = "PL/R - R Procedural Language for PostgreSQL";
|
||||||
homepage = "https://github.com/postgres-plr/plr";
|
homepage = "https://github.com/postgres-plr/plr";
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
, perl
|
, perl
|
||||||
, postgresql
|
, postgresql
|
||||||
, jitSupport
|
, jitSupport
|
||||||
|
, buildPostgresqlExtension
|
||||||
# For test
|
# For test
|
||||||
, runCommand
|
, runCommand
|
||||||
, coreutils
|
, coreutils
|
||||||
|
@ -13,7 +14,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
libv8 = nodejs_20.libv8;
|
libv8 = nodejs_20.libv8;
|
||||||
in stdenv.mkDerivation (finalAttrs: {
|
in buildPostgresqlExtension (finalAttrs: {
|
||||||
pname = "plv8";
|
pname = "plv8";
|
||||||
version = "3.2.3";
|
version = "3.2.3";
|
||||||
|
|
||||||
|
@ -36,7 +37,6 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libv8
|
libv8
|
||||||
postgresql
|
|
||||||
];
|
];
|
||||||
|
|
||||||
buildFlags = [ "all" ];
|
buildFlags = [ "all" ];
|
||||||
|
@ -48,11 +48,6 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||||
"V8_OUTDIR=${libv8}/lib"
|
"V8_OUTDIR=${libv8}/lib"
|
||||||
];
|
];
|
||||||
|
|
||||||
installFlags = [
|
|
||||||
# PGXS only supports installing to postgresql prefix so we need to redirect this
|
|
||||||
"DESTDIR=${placeholder "out"}"
|
|
||||||
];
|
|
||||||
|
|
||||||
# No configure script.
|
# No configure script.
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
|
||||||
|
@ -60,14 +55,6 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||||
patchShebangs ./generate_upgrade.sh
|
patchShebangs ./generate_upgrade.sh
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
# Move the redirected to proper directory.
|
|
||||||
# There appear to be no references to the install directories
|
|
||||||
# so changing them does not cause issues.
|
|
||||||
mv "$out/nix/store"/*/* "$out"
|
|
||||||
rmdir "$out/nix/store"/* "$out/nix/store" "$out/nix"
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
tests =
|
tests =
|
||||||
let
|
let
|
||||||
|
|
|
@ -21,12 +21,13 @@
|
||||||
nixosTests,
|
nixosTests,
|
||||||
jitSupport,
|
jitSupport,
|
||||||
llvm,
|
llvm,
|
||||||
|
buildPostgresqlExtension,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
gdal = gdalMinimal;
|
gdal = gdalMinimal;
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "postgis";
|
pname = "postgis";
|
||||||
version = "3.5.0";
|
version = "3.5.0";
|
||||||
|
|
||||||
|
@ -42,7 +43,6 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libxml2
|
libxml2
|
||||||
postgresql
|
|
||||||
geos
|
geos
|
||||||
proj
|
proj
|
||||||
gdal
|
gdal
|
||||||
|
@ -68,20 +68,18 @@ stdenv.mkDerivation rec {
|
||||||
# postgis config directory assumes /include /lib from the same root for json-c library
|
# postgis config directory assumes /include /lib from the same root for json-c library
|
||||||
env.NIX_LDFLAGS = "-L${lib.getLib json_c}/lib";
|
env.NIX_LDFLAGS = "-L${lib.getLib json_c}/lib";
|
||||||
|
|
||||||
|
setOutputFlags = false;
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
sed -i 's@/usr/bin/file@${file}/bin/file@' configure
|
sed -i 's@/usr/bin/file@${file}/bin/file@' configure
|
||||||
configureFlags="--datadir=$out/share/postgresql --datarootdir=$out/share/postgresql --bindir=$out/bin --docdir=$doc/share/doc/${pname} --with-gdalconfig=${gdal}/bin/gdal-config --with-jsondir=${json_c.dev} --disable-extension-upgrades-install"
|
|
||||||
|
|
||||||
makeFlags="PERL=${perl}/bin/perl datadir=$out/share/postgresql pkglibdir=$out/lib bindir=$out/bin docdir=$doc/share/doc/${pname}"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--with-gdalconfig=${gdal}/bin/gdal-config"
|
||||||
|
"--with-jsondir=${json_c.dev}"
|
||||||
|
"--disable-extension-upgrades-install"
|
||||||
|
];
|
||||||
|
|
||||||
postConfigure = ''
|
postConfigure = ''
|
||||||
sed -i "s|@mkdir -p \$(DESTDIR)\$(PGSQL_BINDIR)||g ;
|
|
||||||
s|\$(DESTDIR)\$(PGSQL_BINDIR)|$prefix/bin|g
|
|
||||||
" \
|
|
||||||
"raster/loader/Makefile";
|
|
||||||
sed -i "s|\$(DESTDIR)\$(PGSQL_BINDIR)|$prefix/bin|g
|
|
||||||
" \
|
|
||||||
"raster/scripts/python/Makefile";
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
|
||||||
# postgis' build system assumes it is being installed to the same place as postgresql, and looks
|
# postgis' build system assumes it is being installed to the same place as postgresql, and looks
|
||||||
|
@ -89,12 +87,13 @@ stdenv.mkDerivation rec {
|
||||||
ln -s ${postgresql}/bin/postgres $out/bin/postgres
|
ln -s ${postgresql}/bin/postgres $out/bin/postgres
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"PERL=${perl}/bin/perl"
|
||||||
|
];
|
||||||
|
|
||||||
doCheck = stdenv.hostPlatform.isLinux;
|
doCheck = stdenv.hostPlatform.isLinux;
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
substituteInPlace regress/run_test.pl --replace-fail "/share/contrib/postgis" "$out/share/postgresql/contrib/postgis"
|
|
||||||
substituteInPlace regress/Makefile --replace-fail 's,\$$libdir,$(REGRESS_INSTALLDIR)/lib,g' "s,\\$\$libdir,$PWD/regress/00-regress-install$out/lib,g" \
|
|
||||||
--replace-fail '$(REGRESS_INSTALLDIR)/share/contrib/postgis/*.sql' "$PWD/regress/00-regress-install$out/share/postgresql/contrib/postgis/*.sql"
|
|
||||||
substituteInPlace doc/postgis-out.xml --replace-fail "http://docbook.org/xml/5.0/dtd/docbook.dtd" "${docbook5}/xml/dtd/docbook/docbookx.dtd"
|
substituteInPlace doc/postgis-out.xml --replace-fail "http://docbook.org/xml/5.0/dtd/docbook.dtd" "${docbook5}/xml/dtd/docbook/docbookx.dtd"
|
||||||
# The test suite hardcodes it to use /tmp.
|
# The test suite hardcodes it to use /tmp.
|
||||||
export PGIS_REG_TMPDIR="$TMPDIR/pgis_reg"
|
export PGIS_REG_TMPDIR="$TMPDIR/pgis_reg"
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
, flex
|
, flex
|
||||||
, curl
|
, curl
|
||||||
, json_c
|
, json_c
|
||||||
|
, buildPostgresqlExtension
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "repmgr";
|
pname = "repmgr";
|
||||||
version = "5.4.1";
|
version = "5.4.1";
|
||||||
|
|
||||||
|
@ -20,16 +21,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
nativeBuildInputs = [ flex ];
|
nativeBuildInputs = [ flex ];
|
||||||
|
|
||||||
buildInputs = postgresql.buildInputs ++ [ postgresql curl json_c ];
|
buildInputs = postgresql.buildInputs ++ [ curl json_c ];
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/{bin,lib,share/postgresql/extension}
|
|
||||||
|
|
||||||
cp repmgr{,d} $out/bin
|
|
||||||
cp *${postgresql.dlSuffix} $out/lib
|
|
||||||
cp *.sql $out/share/postgresql/extension
|
|
||||||
cp *.control $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://repmgr.org/";
|
homepage = "https://repmgr.org/";
|
||||||
|
|
|
@ -4,9 +4,10 @@
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
postgresql,
|
postgresql,
|
||||||
postgresqlTestHook,
|
postgresqlTestHook,
|
||||||
|
buildPostgresqlExtension,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
buildPostgresqlExtension (finalAttrs: {
|
||||||
pname = "rum";
|
pname = "rum";
|
||||||
version = "1.3.14";
|
version = "1.3.14";
|
||||||
|
|
||||||
|
@ -17,16 +18,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
hash = "sha256-VsfpxQqRBu9bIAP+TfMRXd+B3hSjuhU2NsutocNiCt8=";
|
hash = "sha256-VsfpxQqRBu9bIAP+TfMRXd+B3hSjuhU2NsutocNiCt8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
makeFlags = [ "USE_PGXS=1" ];
|
makeFlags = [ "USE_PGXS=1" ];
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib *${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
install -D -t $out/share/postgresql/extension *.sql
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.tests.extension = stdenv.mkDerivation {
|
passthru.tests.extension = stdenv.mkDerivation {
|
||||||
inherit (finalAttrs) version;
|
inherit (finalAttrs) version;
|
||||||
pname = "rum-test";
|
pname = "rum-test";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchgit, postgresql }:
|
{ lib, stdenv, fetchgit, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "smlar-unstable";
|
pname = "smlar-unstable";
|
||||||
version = "2021-11-08";
|
version = "2021-11-08";
|
||||||
|
|
||||||
|
@ -10,16 +10,8 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-AC6w7uYw0OW70pQpWbK1A3rkCnMvTJzTCAdFiY3rO7A=";
|
hash = "sha256-AC6w7uYw0OW70pQpWbK1A3rkCnMvTJzTCAdFiY3rO7A=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
makeFlags = [ "USE_PGXS=1" ];
|
makeFlags = [ "USE_PGXS=1" ];
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib *.so
|
|
||||||
install -D -t $out/share/postgresql/extension *.sql
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Compute similary of any one-dimensional arrays";
|
description = "Compute similary of any one-dimensional arrays";
|
||||||
homepage = "http://sigaev.ru/git/gitweb.cgi?p=smlar.git";
|
homepage = "http://sigaev.ru/git/gitweb.cgi?p=smlar.git";
|
||||||
|
|
|
@ -3,13 +3,12 @@
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
postgresql,
|
postgresql,
|
||||||
|
buildPostgresqlExtension,
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "system_stats";
|
pname = "system_stats";
|
||||||
version = "3.2";
|
version = "3.2";
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "EnterpriseDB";
|
owner = "EnterpriseDB";
|
||||||
repo = "system_stats";
|
repo = "system_stats";
|
||||||
|
@ -17,18 +16,6 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-/xXnui0S0ZjRw7P8kMAgttHVv8T41aOhM3pM8P0OTig=";
|
hash = "sha256-/xXnui0S0ZjRw7P8kMAgttHVv8T41aOhM3pM8P0OTig=";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
mkdir -p $out/{lib,share/postgresql/extension}
|
|
||||||
|
|
||||||
cp *${postgresql.dlSuffix} $out/lib
|
|
||||||
cp *.sql $out/share/postgresql/extension
|
|
||||||
cp *.control $out/share/postgresql/extension
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A Postgres extension for exposing system metrics such as CPU, memory and disk information";
|
description = "A Postgres extension for exposing system metrics such as CPU, memory and disk information";
|
||||||
homepage = "https://github.com/EnterpriseDB/system_stats";
|
homepage = "https://github.com/EnterpriseDB/system_stats";
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql, freetds, unstableGitUpdater }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, freetds, unstableGitUpdater, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "tds_fdw";
|
pname = "tds_fdw";
|
||||||
version = "2.0.4";
|
version = "2.0.4";
|
||||||
|
|
||||||
buildInputs = [ postgresql freetds ];
|
buildInputs = [ freetds ];
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "tds-fdw";
|
owner = "tds-fdw";
|
||||||
|
@ -13,13 +13,6 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-ruelOHueaHx1royLPvDM8Abd1rQD62R4KXgtHY9qqTw=";
|
hash = "sha256-ruelOHueaHx1royLPvDM8Abd1rQD62R4KXgtHY9qqTw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
version="$(sed -En "s,^default_version *= *'([^']*)'.*,\1,p" tds_fdw.control)"
|
|
||||||
install -D tds_fdw${postgresql.dlSuffix} -t $out/lib
|
|
||||||
install -D sql/tds_fdw.sql "$out/share/postgresql/extension/tds_fdw--$version.sql"
|
|
||||||
install -D tds_fdw.control -t $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "PostgreSQL foreign data wrapper to connect to TDS databases (Sybase and Microsoft SQL Server)";
|
description = "PostgreSQL foreign data wrapper to connect to TDS databases (Sybase and Microsoft SQL Server)";
|
||||||
homepage = "https://github.com/tds-fdw/tds_fdw";
|
homepage = "https://github.com/tds-fdw/tds_fdw";
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "temporal_tables";
|
pname = "temporal_tables";
|
||||||
version = "1.2.2";
|
version = "1.2.2";
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "arkhipov";
|
owner = "arkhipov";
|
||||||
repo = "temporal_tables";
|
repo = "temporal_tables";
|
||||||
|
@ -13,12 +11,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-7+DCSPAPhsokWDq/5IXNhd7jY6FfzxxUjlsg/VJeD3k=";
|
sha256 = "sha256-7+DCSPAPhsokWDq/5IXNhd7jY6FfzxxUjlsg/VJeD3k=";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib temporal_tables${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension *.sql
|
|
||||||
install -D -t $out/share/postgresql/extension *.control
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Temporal Tables PostgreSQL Extension";
|
description = "Temporal Tables PostgreSQL Extension";
|
||||||
homepage = "https://github.com/arkhipov/temporal_tables";
|
homepage = "https://github.com/arkhipov/temporal_tables";
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, cmake, postgresql, openssl, libkrb5, nixosTests, enableUnfree ? true }:
|
{ lib, stdenv, fetchFromGitHub, cmake, postgresql, openssl, libkrb5, nixosTests, enableUnfree ? true, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "timescaledb${lib.optionalString (!enableUnfree) "-apache"}";
|
pname = "timescaledb${lib.optionalString (!enableUnfree) "-apache"}";
|
||||||
version = "2.14.2";
|
version = "2.14.2";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
buildInputs = [ postgresql openssl libkrb5 ];
|
buildInputs = [ openssl libkrb5 ];
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "timescale";
|
owner = "timescale";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
{ lib, stdenv, fetchFromGitHub, postgresql, buildPostgresqlExtension }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
buildPostgresqlExtension {
|
||||||
pname = "tsearch-extras";
|
pname = "tsearch-extras";
|
||||||
version = "0.4";
|
version = "0.4";
|
||||||
|
|
||||||
|
@ -11,13 +11,6 @@ stdenv.mkDerivation {
|
||||||
sha256 = "18j0saqblg3jhrz38splk173xjwdf32c67ymm18m8n5y94h8d2ba";
|
sha256 = "18j0saqblg3jhrz38splk173xjwdf32c67ymm18m8n5y94h8d2ba";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D tsearch_extras${postgresql.dlSuffix} -t $out/lib/
|
|
||||||
install -D ./{tsearch_extras--1.0.sql,tsearch_extras.control} -t $out/share/postgresql/extension
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Provides a few PostgreSQL functions for a lower-level data full text search";
|
description = "Provides a few PostgreSQL functions for a lower-level data full text search";
|
||||||
homepage = "https://github.com/zulip/tsearch_extras/";
|
homepage = "https://github.com/zulip/tsearch_extras/";
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
, fetchzip
|
, fetchzip
|
||||||
, nixosTests
|
, nixosTests
|
||||||
, stdenv
|
, stdenv
|
||||||
|
|
||||||
, mecab
|
, mecab
|
||||||
, postgresql
|
, postgresql
|
||||||
}:
|
}:
|
||||||
|
|
|
@ -4,9 +4,10 @@
|
||||||
callPackage,
|
callPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
postgresql,
|
postgresql,
|
||||||
|
buildPostgresqlExtension,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildPostgresqlExtension rec {
|
||||||
pname = "wal2json";
|
pname = "wal2json";
|
||||||
version = "2.6";
|
version = "2.6";
|
||||||
|
|
||||||
|
@ -17,15 +18,8 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-+QoACPCKiFfuT2lJfSUmgfzC5MXf75KpSoc2PzPxKyM=";
|
sha256 = "sha256-+QoACPCKiFfuT2lJfSUmgfzC5MXf75KpSoc2PzPxKyM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ postgresql ];
|
|
||||||
|
|
||||||
makeFlags = [ "USE_PGXS=1" ];
|
makeFlags = [ "USE_PGXS=1" ];
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -D -t $out/lib *${postgresql.dlSuffix}
|
|
||||||
install -D -t $out/share/postgresql/extension sql/*.sql
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.tests.wal2json = lib.recurseIntoAttrs (
|
passthru.tests.wal2json = lib.recurseIntoAttrs (
|
||||||
callPackage ../../../../../nixos/tests/postgresql-wal2json.nix {
|
callPackage ../../../../../nixos/tests/postgresql-wal2json.nix {
|
||||||
inherit (stdenv) system;
|
inherit (stdenv) system;
|
||||||
|
|
|
@ -289,6 +289,7 @@ let
|
||||||
'';
|
'';
|
||||||
installPhase = "touch $out";
|
installPhase = "touch $out";
|
||||||
} // extraArgs);
|
} // extraArgs);
|
||||||
|
buildPostgresqlExtension = newSuper.callPackage ./buildPostgresqlExtension.nix {};
|
||||||
};
|
};
|
||||||
newSelf = self // scope;
|
newSelf = self // scope;
|
||||||
newSuper = { callPackage = newScope (scope // this.pkgs); };
|
newSuper = { callPackage = newScope (scope // this.pkgs); };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue