Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
35 lines
1 KiB
Nix
35 lines
1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, postgresql, postgresqlTestExtension }:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "plpgsql-check";
|
|
version = "2.7.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "okbob";
|
|
repo = "plpgsql_check";
|
|
rev = "v${finalAttrs.version}";
|
|
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 {
|
|
inherit (finalAttrs) finalPackage;
|
|
sql = "CREATE EXTENSION plpgsql_check;";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Linter tool for language PL/pgSQL";
|
|
homepage = "https://github.com/okbob/plpgsql_check";
|
|
changelog = "https://github.com/okbob/plpgsql_check/releases/tag/v${finalAttrs.version}";
|
|
platforms = postgresql.meta.platforms;
|
|
license = licenses.mit;
|
|
maintainers = [ ];
|
|
};
|
|
})
|