mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-17 10:37:45 +03:00
Merge pull request #327647 from michaelglass/add-percona-toolkit-as-package
This commit is contained in:
commit
984a495f68
@ -13175,6 +13175,13 @@
|
||||
github = "michaeldonovan";
|
||||
githubId = 14077230;
|
||||
};
|
||||
michaelglass = {
|
||||
email = "nixpkgs@mike.is";
|
||||
name = "Michael Glass";
|
||||
github = "michaelglass";
|
||||
githubId = 60136;
|
||||
keys = [ { fingerprint = "46AF 8625 D92A 219B 8E6D B7F8 9CDD 3769 1649 1385"; } ];
|
||||
};
|
||||
michaelgrahamevans = {
|
||||
email = "michaelgrahamevans@gmail.com";
|
||||
name = "Michael Evans";
|
||||
|
51
pkgs/by-name/pe/percona-toolkit/package.nix
Normal file
51
pkgs/by-name/pe/percona-toolkit/package.nix
Normal file
@ -0,0 +1,51 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
perlPackages,
|
||||
makeWrapper,
|
||||
}:
|
||||
|
||||
let
|
||||
perconaToolkit = perlPackages.PerconaToolkit;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = perconaToolkit.name;
|
||||
version = perconaToolkit.version;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
src = perconaToolkit;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
# make sure dest already exists before symlink
|
||||
# this prevents installing a broken link into the path
|
||||
ln -s ${perconaToolkit}/lib $out/lib
|
||||
ln -s ${perconaToolkit}/share $out/share
|
||||
|
||||
for cmd in ${perconaToolkit}/bin/*; do
|
||||
ln -s $cmd $out/bin
|
||||
done
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
postFixup = ''
|
||||
for cmd in $out/bin/*; do
|
||||
wrapProgram $cmd --prefix PERL5LIB
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
inherit (perconaToolkit.meta)
|
||||
description
|
||||
homepage
|
||||
license
|
||||
platforms
|
||||
changelog
|
||||
;
|
||||
|
||||
maintainers = with lib.maintainers; [ michaelglass ];
|
||||
};
|
||||
}
|
@ -1,5 +1,12 @@
|
||||
{ lib, fetchFromGitHub, buildPerlPackage, shortenPerlShebang
|
||||
, DBDmysql, DBI, IOSocketSSL, TermReadKey
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
buildPerlPackage,
|
||||
shortenPerlShebang,
|
||||
DBDmysql,
|
||||
DBI,
|
||||
IOSocketSSL,
|
||||
TermReadKey,
|
||||
}:
|
||||
|
||||
buildPerlPackage rec {
|
||||
@ -17,7 +24,12 @@ buildPerlPackage rec {
|
||||
|
||||
nativeBuildInputs = [ shortenPerlShebang ];
|
||||
|
||||
buildInputs = [ DBDmysql DBI IOSocketSSL TermReadKey ];
|
||||
buildInputs = [
|
||||
DBDmysql
|
||||
DBI
|
||||
IOSocketSSL
|
||||
TermReadKey
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
shortenPerlShebang $(grep -l "/bin/env perl" $out/bin/*)
|
||||
@ -26,6 +38,7 @@ buildPerlPackage rec {
|
||||
meta = {
|
||||
description = "Collection of advanced command-line tools to perform a variety of MySQL and system tasks";
|
||||
homepage = "https://www.percona.com/software/database-tools/percona-toolkit";
|
||||
changelog = "https://docs.percona.com/percona-toolkit/release_notes.html";
|
||||
license = with lib.licenses; [ gpl2Only ];
|
||||
maintainers = with lib.maintainers; [ izorkin ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user