1 { lib, stdenv, perlPackages, fetchFromGitHub, shortenPerlShebang }:
3 perlPackages.buildPerlPackage rec {
7 src = fetchFromGitHub {
11 sha256 = "1awyl6ddfihm7dfr5y2z15r1si5cyipnlyyj3m1l19pk98s4x66l";
16 buildInputs = with perlPackages; [ DBI DBDPg TermReadKey JSON LWP ];
18 nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang;
19 postInstall = lib.optionalString stdenv.isDarwin ''
20 shortenPerlShebang $out/bin/pgtop
24 description = "a PostgreSQL clone of `mytop', which in turn is a `top' clone for MySQL";
25 homepage = "https://github.com/cosimo/pgtop";
26 changelog = "https://github.com/cosimo/pgtop/releases/tag/v${version}";
27 maintainers = [ maintainers.hagl ];
28 license = [ licenses.gpl2Only ];