2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
2020-08-17 10:20:00 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "plpgsql_check";
|
2021-03-12 12:04:53 +00:00
|
|
|
version = "1.16.0";
|
2020-08-17 10:20:00 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "okbob";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-03-12 12:04:53 +00:00
|
|
|
sha256 = "sha256-ZZvRrt2JaAWruAT4FXB6ChS0jLKpUEDCF2UmAAH4BRQ=";
|
2020-08-17 10:20:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ postgresql ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D -t $out/lib *.so
|
|
|
|
install -D -t $out/share/postgresql/extension *.sql
|
|
|
|
install -D -t $out/share/postgresql/extension *.control
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-08-17 10:20:00 +01:00
|
|
|
description = "Linter tool for language PL/pgSQL";
|
|
|
|
homepage = "https://github.com/okbob/plpgsql_check";
|
|
|
|
platforms = postgresql.meta.platforms;
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
};
|
|
|
|
}
|