2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, perl }:
|
2016-10-12 15:26:53 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "mysqltuner";
|
2021-02-06 16:25:30 +01:00
|
|
|
version = "1.7.21";
|
2016-10-12 15:26:53 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-02-22 03:38:54 +01:00
|
|
|
owner = "major";
|
|
|
|
repo = "MySQLTuner-perl";
|
|
|
|
rev = version;
|
2021-02-06 16:25:30 +01:00
|
|
|
sha256 = "sha256-Yv1XjD8sZcmGr2SVD6TEElUH7vspJ61WwQwfXLOrao0=";
|
2016-10-12 15:26:53 +02:00
|
|
|
};
|
|
|
|
|
2021-02-20 17:46:39 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace mysqltuner.pl \
|
2021-02-22 03:38:54 +01:00
|
|
|
--replace '/usr/share' "$out/share"
|
2021-02-20 17:46:39 +01:00
|
|
|
'';
|
|
|
|
|
2016-10-12 15:26:53 +02:00
|
|
|
buildInputs = [ perl ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-02-20 17:46:39 +01:00
|
|
|
runHook preInstall
|
|
|
|
|
2021-02-22 03:38:54 +01:00
|
|
|
install -Dm0555 mysqltuner.pl $out/bin/mysqltuner
|
|
|
|
install -Dm0444 -t $out/share/mysqltuner basic_passwords.txt vulnerabilities.csv
|
2021-02-20 17:46:39 +01:00
|
|
|
|
|
|
|
runHook postInstall
|
2016-10-12 15:26:53 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2016-10-12 15:26:53 +02:00
|
|
|
description = "Make recommendations for increased performance and stability of MariaDB/MySQL";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://mysqltuner.com";
|
2021-02-20 17:46:39 +01:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ peterhoeg shamilton ];
|
2016-10-12 15:26:53 +02:00
|
|
|
};
|
|
|
|
}
|