summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authordavidak <davidak@users.noreply.github.com>2021-02-22 05:13:58 +0100
committerGitHub <noreply@github.com>2021-02-22 05:13:58 +0100
commite8c545f2b271f3884fb39130f3c761e28e168898 (patch)
treec5246ddbd1d4842a8ed181246d18bc8528d96f6b /pkgs/tools
parent3bbd4267ab8f12d249b9092b38e8574e9882a1f1 (diff)
parent2f97bd111074abf7c4c95380fed5925a6b1e45f6 (diff)
downloadnixpkgs-e8c545f2b271f3884fb39130f3c761e28e168898.tar
nixpkgs-e8c545f2b271f3884fb39130f3c761e28e168898.tar.gz
nixpkgs-e8c545f2b271f3884fb39130f3c761e28e168898.tar.bz2
nixpkgs-e8c545f2b271f3884fb39130f3c761e28e168898.tar.lz
nixpkgs-e8c545f2b271f3884fb39130f3c761e28e168898.tar.xz
nixpkgs-e8c545f2b271f3884fb39130f3c761e28e168898.tar.zst
nixpkgs-e8c545f2b271f3884fb39130f3c761e28e168898.zip
Merge pull request #113969 from peterhoeg/f/mysqltuner
mysqltuner: do not pollute global /share
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/mysqltuner/default.nix15
1 files changed, 6 insertions, 9 deletions
diff --git a/pkgs/tools/misc/mysqltuner/default.nix b/pkgs/tools/misc/mysqltuner/default.nix
index e4bb43dd509..2acbfd41adf 100644
--- a/pkgs/tools/misc/mysqltuner/default.nix
+++ b/pkgs/tools/misc/mysqltuner/default.nix
@@ -5,16 +5,15 @@ stdenv.mkDerivation rec {
   version = "1.7.21";
 
   src = fetchFromGitHub {
-    owner  = "major";
-    repo   = "MySQLTuner-perl";
-    rev    = version;
+    owner = "major";
+    repo = "MySQLTuner-perl";
+    rev = version;
     sha256 = "sha256-Yv1XjD8sZcmGr2SVD6TEElUH7vspJ61WwQwfXLOrao0=";
   };
 
   postPatch = ''
     substituteInPlace mysqltuner.pl \
-      --replace '$basic_password_files = "/usr/share/mysqltuner/basic_passwords.txt"' "\$basic_password_files = \"$out/share/basic_passwords.txt\"" \
-      --replace '$opt{cvefile} = "/usr/share/mysqltuner/vulnerabilities.csv"' "\$opt{cvefile} = \"$out/share/vulnerabilities.csv\""
+      --replace '/usr/share' "$out/share"
   '';
 
   buildInputs = [ perl ];
@@ -22,10 +21,8 @@ stdenv.mkDerivation rec {
   installPhase = ''
     runHook preInstall
 
-    mkdir -p "$out/bin"
-    install -Dm 0755 mysqltuner.pl "$out/bin/mysqltuner"
-    install -Dm 0644 basic_passwords.txt "$out/share/basic_passwords.txt"
-    install -Dm 0644 vulnerabilities.csv "$out/share/vulnerabilities.csv"
+    install -Dm0555 mysqltuner.pl $out/bin/mysqltuner
+    install -Dm0444 -t $out/share/mysqltuner basic_passwords.txt vulnerabilities.csv
 
     runHook postInstall
   '';