Merge pull request #276497 from marsam/update-plpgsql_check

postgresqlPackages.plpgsql_check: 2.7.0 -> 2.7.1
This commit is contained in:
Mario Rodas 2023-12-24 18:03:47 -05:00 committed by GitHub
commit eff39da308
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,14 +1,14 @@
{ lib, stdenv, fetchFromGitHub, postgresql }: { lib, stdenv, fetchFromGitHub, postgresql, postgresqlTestHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "plpgsql_check"; pname = "plpgsql-check";
version = "2.7.0"; version = "2.7.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "okbob"; owner = "okbob";
repo = pname; repo = "plpgsql_check";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-DSBr2pmJD/kW1b4nqCTS4KwAAH6eojDmE/RVwvSIAa0="; hash = "sha256-2SOBisIElNqqg5NwFk+pp7sE/+OvTifJUKMWOaOvO3k=";
}; };
buildInputs = [ postgresql ]; buildInputs = [ postgresql ];
@ -19,6 +19,22 @@ stdenv.mkDerivation rec {
install -D -t $out/share/postgresql/extension *.control install -D -t $out/share/postgresql/extension *.control
''; '';
passthru.tests.extension = stdenv.mkDerivation {
name = "plpgsql-check-test";
dontUnpack = true;
doCheck = true;
buildInputs = [ postgresqlTestHook ];
nativeCheckInputs = [ (postgresql.withPackages (ps: [ ps.plpgsql_check ])) ];
postgresqlTestUserOptions = "LOGIN SUPERUSER";
failureHook = "postgresqlStop";
checkPhase = ''
runHook preCheck
psql -a -v ON_ERROR_STOP=1 -c "CREATE EXTENSION plpgsql_check;"
runHook postCheck
'';
installPhase = "touch $out";
};
meta = with lib; { meta = with lib; {
description = "Linter tool for language PL/pgSQL"; description = "Linter tool for language PL/pgSQL";
homepage = "https://github.com/okbob/plpgsql_check"; homepage = "https://github.com/okbob/plpgsql_check";