mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
Merge pull request #92343 from Izorkin/percona-tools
This commit is contained in:
commit
2d357db2e8
@ -1,24 +1,32 @@
|
||||
{ lib, fetchFromGitHub, buildPerlPackage, DBDmysql, DBI, IOSocketSSL, TermReadKey, shortenPerlShebang }:
|
||||
{ stdenv, fetchFromGitHub, buildPerlPackage, shortenPerlShebang
|
||||
, DBDmysql, DBI, IOSocketSSL, TermReadKey
|
||||
}:
|
||||
|
||||
buildPerlPackage {
|
||||
buildPerlPackage rec {
|
||||
pname = "Percona-Toolkit";
|
||||
version = "3.0.12";
|
||||
version = "3.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "percona";
|
||||
repo = "percona-toolkit";
|
||||
rev = "3.0.12";
|
||||
sha256 = "0xk4h4dzl80kf97lbx0nznx9ajrb6kkg7k3iwca3rj6f3rqggv9y";
|
||||
rev = "v${version}";
|
||||
sha256 = "084ldpskvlfm32lfss5qqzm5y9b8hf029aa4i5pcnzgb53xaxkqx";
|
||||
};
|
||||
|
||||
outputs = [ "out" ];
|
||||
|
||||
nativeBuildInputs = [ shortenPerlShebang ];
|
||||
|
||||
buildInputs = [ DBDmysql DBI IOSocketSSL TermReadKey ];
|
||||
|
||||
postInstall = ''
|
||||
shortenPerlShebang $(grep -l "/bin/env perl" $out/bin/*)
|
||||
'';
|
||||
meta = {
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = ''Collection of advanced command-line tools to perform a variety of MySQL and system tasks.'';
|
||||
homepage = "http://www.percona.com/software/percona-toolkit";
|
||||
license = with lib.licenses; [ gpl2 ];
|
||||
maintainers = with lib.maintainers; [ izorkin ];
|
||||
homepage = "https://www.percona.com/software/database-tools/percona-toolkit";
|
||||
license = with licenses; [ gpl2 ];
|
||||
maintainers = with maintainers; [ izorkin ];
|
||||
};
|
||||
}
|
||||
|
6
pkgs/tools/backup/percona-xtrabackup/2_4.nix
Normal file
6
pkgs/tools/backup/percona-xtrabackup/2_4.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{ callPackage, ... } @ args:
|
||||
|
||||
callPackage ./generic.nix (args // {
|
||||
version = "2.4.20";
|
||||
sha256 = "0awdpkcgvx2aq7pwxy8jyzkin6cyrrh3d576x9ldm851kis9n5ii";
|
||||
})
|
14
pkgs/tools/backup/percona-xtrabackup/8_0.nix
Normal file
14
pkgs/tools/backup/percona-xtrabackup/8_0.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{ callPackage, ... } @ args:
|
||||
|
||||
callPackage ./generic.nix (args // {
|
||||
version = "8.0.13";
|
||||
sha256 = "0cj0fnjimv22ykfl0yk6w29wcjvqp8y8j2g1c6gcml65qazrswyr";
|
||||
|
||||
extraPatches = [
|
||||
./../../../servers/sql/mysql/abi-check.patch
|
||||
];
|
||||
|
||||
extraPostInstall = ''
|
||||
rm -r "$out"/docs
|
||||
'';
|
||||
})
|
@ -1,45 +0,0 @@
|
||||
{ stdenv, fetchFromGitHub, cmake, pkgconfig
|
||||
, boost, bison, curl, ncurses, openssl, xxd
|
||||
, libaio, libev, libgcrypt, libgpgerror, libtool, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "percona-xtrabackup";
|
||||
version = "2.4.12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "percona";
|
||||
repo = "percona-xtrabackup";
|
||||
rev = "${pname}-${version}";
|
||||
sha256 = "1w17v2c677b3vfnm81bs63kjbfiin7f12wl9fbgp83hfpyx5msan";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
|
||||
buildInputs = [
|
||||
boost bison curl ncurses openssl xxd
|
||||
libaio libev libgcrypt libgpgerror libtool zlib
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_CONFIG=xtrabackup_release"
|
||||
"-DINSTALL_MYSQLTESTDIR=OFF"
|
||||
"-DWITH_BOOST=system"
|
||||
"-DWITH_SSL=system"
|
||||
"-DWITH_ZLIB=system"
|
||||
"-DWITH_MAN_PAGES=OFF"
|
||||
"-DCMAKE_CXX_FLAGS=-std=gnu++03"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
rm -r "$out"/lib/plugin/debug
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Non-blocking backup tool for MySQL";
|
||||
homepage = "http://www.percona.com/software/percona-xtrabackup";
|
||||
license = licenses.lgpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ izorkin ];
|
||||
};
|
||||
}
|
58
pkgs/tools/backup/percona-xtrabackup/generic.nix
Normal file
58
pkgs/tools/backup/percona-xtrabackup/generic.nix
Normal file
@ -0,0 +1,58 @@
|
||||
{ stdenv, fetchFromGitHub, bison, boost, cmake, makeWrapper, pkgconfig
|
||||
, curl, cyrus_sasl, libaio, libedit, libev, libevent, libgcrypt, libgpgerror, lz4
|
||||
, ncurses, numactl, openssl, protobuf, valgrind, xxd, zlib
|
||||
, perlPackages
|
||||
, version, sha256, extraPatches ? [], extraPostInstall ? "", ...
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "percona-xtrabackup";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "percona";
|
||||
repo = "percona-xtrabackup";
|
||||
rev = "${pname}-${version}";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ bison boost cmake makeWrapper pkgconfig ];
|
||||
|
||||
buildInputs = [
|
||||
curl cyrus_sasl libaio libedit libev libevent libgcrypt libgpgerror lz4
|
||||
ncurses numactl openssl protobuf valgrind xxd zlib
|
||||
] ++ (with perlPackages; [ perl DBI DBDmysql ]);
|
||||
|
||||
patches = extraPatches;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
|
||||
"-DBUILD_CONFIG=xtrabackup_release"
|
||||
"-DINSTALL_MYSQLTESTDIR=OFF"
|
||||
"-DWITH_BOOST=system"
|
||||
"-DWITH_CURL=system"
|
||||
"-DWITH_EDITLINE=system"
|
||||
"-DWITH_LIBEVENT=system"
|
||||
"-DWITH_LZ4=system"
|
||||
"-DWITH_PROTOBUF=system"
|
||||
"-DWITH_SASL=system"
|
||||
"-DWITH_SSL=system"
|
||||
"-DWITH_ZLIB=system"
|
||||
"-DWITH_VALGRIND=ON"
|
||||
"-DWITH_MAN_PAGES=OFF"
|
||||
"-DCMAKE_SKIP_BUILD_RPATH=OFF" # To run libmysql/libmysql_api_test during build.
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram "$out"/bin/xtrabackup --prefix PERL5LIB : $PERL5LIB
|
||||
rm -r "$out"/lib/plugin/debug
|
||||
'' + extraPostInstall;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Non-blocking backup tool for MySQL";
|
||||
homepage = "http://www.percona.com/software/percona-xtrabackup";
|
||||
license = licenses.lgpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ izorkin ];
|
||||
};
|
||||
}
|
@ -5917,9 +5917,13 @@ in
|
||||
|
||||
perceptualdiff = callPackage ../tools/graphics/perceptualdiff { };
|
||||
|
||||
percona-xtrabackup = callPackage ../tools/backup/percona-xtrabackup {
|
||||
percona-xtrabackup = percona-xtrabackup_8_0;
|
||||
percona-xtrabackup_2_4 = callPackage ../tools/backup/percona-xtrabackup/2_4.nix {
|
||||
boost = boost159;
|
||||
};
|
||||
percona-xtrabackup_8_0 = callPackage ../tools/backup/percona-xtrabackup/8_0.nix {
|
||||
boost = boost170;
|
||||
};
|
||||
|
||||
pick = callPackage ../tools/misc/pick { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user