@@ -11,17 +11,29 @@ stdenv.mkDerivation rec {
1111 sha256 = "sha256-Yv1XjD8sZcmGr2SVD6TEElUH7vspJ61WwQwfXLOrao0=";
1212 };
1313
14+ postPatch = ''
15+ substituteInPlace mysqltuner.pl \
16+ --replace '$basic_password_files = "/usr/share/mysqltuner/basic_passwords.txt"' "\$basic_password_files = \"$out/share/basic_passwords.txt\"" \
17+ --replace '$opt{cvefile} = "/usr/share/mysqltuner/vulnerabilities.csv"' "\$opt{cvefile} = \"$out/share/vulnerabilities.csv\""
18+ '';
19+
1420 buildInputs = [ perl ];
1521
1622 installPhase = ''
17− mkdir -p $out/bin
18− install -m0755 mysqltuner.pl $out/bin/mysqltuner
23+ runHook preInstall
24+
25+ mkdir -p "$out/bin"
26+ install -Dm 0755 mysqltuner.pl "$out/bin/mysqltuner"
27+ install -Dm 0644 basic_passwords.txt "$out/share/basic_passwords.txt"
28+ install -Dm 0644 vulnerabilities.csv "$out/share/vulnerabilities.csv"
29+
30+ runHook postInstall
1931 '';
2032
2133 meta = with lib; {
2234 description = "Make recommendations for increased performance and stability of MariaDB/MySQL";
2335 homepage = "http://mysqltuner.com";
24− license = licenses.gpl3;
25− maintainers = with maintainers; [ peterhoeg ];
36+ license = licenses.gpl3Plus;
37+ maintainers = with maintainers; [ peterhoeg shamilton ];
2638 };
2739}