
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
38 lines
941 B
Nix
38 lines
941 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 = "https://github.com/major/MySQLTuner-perl";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [ peterhoeg shamilton ];
|
|
mainProgram = "mysqltuner";
|
|
};
|
|
}
|