1{ lib, fetchFromGitHub, buildPerlPackage, shortenPerlShebang
2, DBDmysql, DBI, IOSocketSSL, TermReadKey
3}:
4
5buildPerlPackage rec {
6 pname = "Percona-Toolkit";
7 version = "3.2.0";
8
9 src = fetchFromGitHub {
10 owner = "percona";
11 repo = "percona-toolkit";
12 rev = "v${version}";
13 sha256 = "084ldpskvlfm32lfss5qqzm5y9b8hf029aa4i5pcnzgb53xaxkqx";
14 };
15
16 outputs = [ "out" ];
17
18 nativeBuildInputs = [ shortenPerlShebang ];
19
20 buildInputs = [ DBDmysql DBI IOSocketSSL TermReadKey ];
21
22 postInstall = ''
23 shortenPerlShebang $(grep -l "/bin/env perl" $out/bin/*)
24 '';
25
26 meta = {
27 description = "Collection of advanced command-line tools to perform a variety of MySQL and system tasks";
28 homepage = "https://www.percona.com/software/database-tools/percona-toolkit";
29 license = with lib.licenses; [ gpl2Only ];
30 maintainers = with lib.maintainers; [ izorkin ];
31 };
32}