blob: e76058f1d3204a7ef0d06edef52541f8a1339305 (
plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
{
fetchFromGitHub,
lib,
perl,
postgresql,
postgresqlBuildExtension,
postgresqlTestExtension,
}:
postgresqlBuildExtension (finalAttrs: {
pname = "pgddl";
version = "0.30";
src = fetchFromGitHub {
owner = "lacanoid";
repo = "pgddl";
tag = finalAttrs.version;
hash = "sha256-w08IgnobIhlwRGrz+feEnZbI1KrWrMRI4BvNVUZFSSg=";
};
nativeBuildInputs = [
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;
};
})
|