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