postgresqlPackages.plpgsql_check: 2.7.0 -> 2.7.1
Diff: https://github.com/okbob/plpgsql_check/compare/v2.7.0...v2.7.1 Changelog: https://github.com/okbob/plpgsql_check/releases/tag/v2.7.1
This commit is contained in:
parent
c96d2e52b6
commit
72dcff1759
@ -1,14 +1,14 @@
|
||||
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
||||
{ lib, stdenv, fetchFromGitHub, postgresql, postgresqlTestHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "plpgsql_check";
|
||||
version = "2.7.0";
|
||||
pname = "plpgsql-check";
|
||||
version = "2.7.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "okbob";
|
||||
repo = pname;
|
||||
repo = "plpgsql_check";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-DSBr2pmJD/kW1b4nqCTS4KwAAH6eojDmE/RVwvSIAa0=";
|
||||
hash = "sha256-2SOBisIElNqqg5NwFk+pp7sE/+OvTifJUKMWOaOvO3k=";
|
||||
};
|
||||
|
||||
buildInputs = [ postgresql ];
|
||||
@ -19,6 +19,22 @@ stdenv.mkDerivation rec {
|
||||
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; {
|
||||
description = "Linter tool for language PL/pgSQL";
|
||||
homepage = "https://github.com/okbob/plpgsql_check";
|
||||
|
Loading…
Reference in New Issue
Block a user