2021-09-29 15:57:04 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, gnugrep, ncurses, pkg-config, installShellFiles, readline, postgresql }:
|
2018-04-08 05:24:34 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "pspg";
|
2023-11-15 15:42:08 +00:00
|
|
|
version = "5.8.1";
|
2018-04-08 05:24:34 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "okbob";
|
2019-10-23 14:51:14 +00:00
|
|
|
repo = pname;
|
2019-09-08 23:38:31 +00:00
|
|
|
rev = version;
|
2023-11-15 15:42:08 +00:00
|
|
|
sha256 = "sha256-nsGBBGw66LCwOuNdBjlz6u9RT+BX6iZmZeDY9yJoc+c=";
|
2018-04-08 05:24:34 +00:00
|
|
|
};
|
|
|
|
|
2021-09-29 15:57:04 +00:00
|
|
|
nativeBuildInputs = [ pkg-config installShellFiles ];
|
2020-01-21 09:20:00 +00:00
|
|
|
buildInputs = [ gnugrep ncurses readline postgresql ];
|
2018-04-08 05:24:34 +00:00
|
|
|
|
2019-10-23 14:51:14 +00:00
|
|
|
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
2018-04-08 05:24:34 +00:00
|
|
|
|
2021-09-29 15:57:04 +00:00
|
|
|
postInstall = ''
|
2023-02-13 19:35:00 +00:00
|
|
|
installManPage pspg.1
|
2021-10-20 01:51:20 +00:00
|
|
|
installShellCompletion --bash --cmd pspg bash-completion.sh
|
2021-09-29 15:57:04 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-10-23 14:51:14 +00:00
|
|
|
homepage = "https://github.com/okbob/pspg";
|
2018-04-08 05:24:34 +00:00
|
|
|
description = "Postgres Pager";
|
|
|
|
license = licenses.bsd2;
|
2020-01-21 09:20:00 +00:00
|
|
|
platforms = platforms.unix;
|
2018-04-08 05:24:34 +00:00
|
|
|
maintainers = [ maintainers.jlesquembre ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "pspg";
|
2018-04-08 05:24:34 +00:00
|
|
|
};
|
|
|
|
}
|