depot/third_party/nixpkgs/pkgs/tools/misc/mysqltuner/default.nix
Default email 3cbfd2b52c Project import generated by Copybara.
GitOrigin-RevId: 395879c28386e1abf20c7ecacd45880759548391
2021-12-18 20:06:50 -05:00

36 lines
890 B
Nix

{ lib, stdenv, fetchFromGitHub, perl }:
stdenv.mkDerivation rec {
pname = "mysqltuner";
version = "1.8.3";
src = fetchFromGitHub {
owner = "major";
repo = "MySQLTuner-perl";
rev = version;
sha256 = "sha256-ezF0zjQB/KWD5rUcbXx2uwiNLsIJ7ZKMoqkclP7oc98=";
};
postPatch = ''
substituteInPlace mysqltuner.pl \
--replace '/usr/share' "$out/share"
'';
buildInputs = [ perl ];
installPhase = ''
runHook preInstall
install -Dm0555 mysqltuner.pl $out/bin/mysqltuner
install -Dm0444 -t $out/share/mysqltuner basic_passwords.txt vulnerabilities.csv
runHook postInstall
'';
meta = with lib; {
description = "Make recommendations for increased performance and stability of MariaDB/MySQL";
homepage = "http://mysqltuner.com";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ peterhoeg shamilton ];
};
}