1{buildPerlPackage, lib, fetchurl, DBDmysql}:
2
3buildPerlPackage {
4 pname = "maatkit";
5 version = "7540";
6
7 src = fetchurl {
8 url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/maatkit/maatkit-7540.tar.gz";
9 sha256 = "1a7rxrddkrsfxb2wj01ha91ld0vapfkqcy8j9p08l76zz2l8p2v1";
10 };
11
12 outputs = [ "out" ];
13
14 buildInputs = [ DBDmysql ] ;
15
16 preConfigure = ''
17 find . | while read fn; do
18 if test -f "$fn"; then
19 first=$(dd if="$fn" count=2 bs=1 2> /dev/null)
20 if test "$first" = "#!"; then
21 sed < "$fn" > "$fn".tmp \
22 -e "s|^#\!\(.*[/\ ]perl.*\)$|#\!$perl/bin/perl $perlFlags|"
23 if test -x "$fn"; then chmod +x "$fn".tmp; fi
24 mv "$fn".tmp "$fn"
25 fi
26 fi
27 done
28 '' ;
29
30 meta = with lib; {
31 description = "Database toolkit";
32 longDescription = ''
33 You can use Maatkit to prove replication is working correctly, fix
34 corrupted data, automate repetitive tasks, speed up your servers, and
35 much more.
36
37 In addition to MySQL, there is support for PostgreSQL, Memcached, and a
38 growing variety of other databases and technologies.
39 '';
40 license = licenses.gpl2Plus;
41 homepage = "http://www.maatkit.org/";
42 };
43}