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