aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/tools/backup/percona-xtrabackup/default.nix
blob: a610bb8e13a47068f8e8e4b10dd55c6aa62e2bc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ 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 ];
  };
}