2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, perl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mysqltuner";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "1.8.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-02-22 21:28:39 +00:00
|
|
|
owner = "major";
|
|
|
|
repo = "MySQLTuner-perl";
|
|
|
|
rev = version;
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-ezF0zjQB/KWD5rUcbXx2uwiNLsIJ7ZKMoqkclP7oc98=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-22 21:28:39 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace mysqltuner.pl \
|
|
|
|
--replace '/usr/share' "$out/share"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ perl ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-02-22 21:28:39 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm0555 mysqltuner.pl $out/bin/mysqltuner
|
|
|
|
install -Dm0444 -t $out/share/mysqltuner basic_passwords.txt vulnerabilities.csv
|
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Make recommendations for increased performance and stability of MariaDB/MySQL";
|
2022-01-03 16:56:52 +00:00
|
|
|
homepage = "https://github.com/major/MySQLTuner-perl";
|
2021-02-22 21:28:39 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ peterhoeg shamilton ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|