forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
postgresqlPackages.pgddl: init at 0.29
- Loading branch information
1 parent
65b3b59
commit 398000e
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; | ||
}) |