depot/pkgs/servers/sql/postgresql/ext/plpgsql_check.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1 KiB
Nix
Raw Normal View History

{ 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 = [ ];
};
})