17 buildPerlPackage rec {
21 src = fetchFromGitHub {
24 rev = "refs/tags/v${version}";
25 hash = "sha256-an/BOkQsMkTXS0HywV1JWerS16HRbO1MHVleYhVqmBM=";
29 patchShebangs ./pgbadger
32 # pgbadger has too many `-Idir` flags on its shebang line on Darwin,
33 # causing the build to fail when trying to generate the documentation.
34 # Rewrite the -I flags in `use lib` form.
35 preBuild = lib.optionalString stdenv.hostPlatform.isDarwin ''
36 shortenPerlShebang ./pgbadger
41 PERL_MM_OPT = "INSTALL_BASE=${placeholder "out"}";
49 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ shortenPerlShebang ];
57 tests.version = testers.testVersion {
59 command = "${lib.getExe pgbadger} --version";
62 updateScript = nix-update-script { };
66 homepage = "https://github.com/darold/pgbadger";
67 description = "Fast PostgreSQL Log Analyzer";
68 changelog = "https://github.com/darold/pgbadger/raw/v${version}/ChangeLog";
69 license = lib.licenses.postgresql;
70 maintainers = lib.teams.determinatesystems.members;
71 mainProgram = "pgbadger";