Merge: postgresqlPackages.pgddl: init at 0.29 (#377938)
This commit is contained in:
@@ -11373,6 +11373,12 @@
|
||||
github = "josephsurin";
|
||||
githubId = 14977484;
|
||||
};
|
||||
joshainglis = {
|
||||
name = "Josha Inglis";
|
||||
email = "joshainglis@gmail.com";
|
||||
github = "joshainglis";
|
||||
githubId = 1281131;
|
||||
};
|
||||
joshniemela = {
|
||||
name = "Joshua Niemelä";
|
||||
email = "josh@jniemela.dk";
|
||||
|
||||
@@ -116,6 +116,8 @@ in {
|
||||
tsja = super.callPackage ./tsja.nix { };
|
||||
|
||||
wal2json = super.callPackage ./wal2json.nix { };
|
||||
|
||||
pgddl = super.callPackage ./pgddl.nix {};
|
||||
} // 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)";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
postgresql,
|
||||
buildPostgresqlExtension,
|
||||
postgresqlTestExtension,
|
||||
perl,
|
||||
}:
|
||||
buildPostgresqlExtension (finalAttrs: {
|
||||
pname = "pgddl";
|
||||
version = "0.29";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lacanoid";
|
||||
repo = "pgddl";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-W3G6TGtkj+zXXdGZZR0bmZhsLuFJvuGTlDoo8kL8sf0=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
postgresql
|
||||
perl
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
patchShebangs --build ./bin/ ./docs
|
||||
'';
|
||||
|
||||
passthru.tests.extension = postgresqlTestExtension {
|
||||
inherit (finalAttrs) finalPackage;
|
||||
sql = ''
|
||||
CREATE EXTENSION ddlx;
|
||||
|
||||
CREATE TABLE a(i int PRIMARY KEY, j int);
|
||||
|
||||
SELECT ddlx_create('a'::regclass);
|
||||
SELECT ddlx_drop('a'::regclass);
|
||||
SELECT ddlx_script('a'::regclass);
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "DDL eXtractor functions for PostgreSQL";
|
||||
homepage = "https://github.com/lacanoid/pgddl";
|
||||
changelog = "https://github.com/lacanoid/pgddl/releases/tag/${finalAttrs.version}";
|
||||
platforms = postgresql.meta.platforms;
|
||||
maintainers = [ lib.maintainers.joshainglis ];
|
||||
license = lib.licenses.postgresql;
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user