biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / backup / percona-xtrabackup / generic.nix
blob3f4cdd86cf10a5c7c7063a8bb4f9dd79603caade
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   bison,
6   boost,
7   cmake,
8   makeWrapper,
9   pkg-config,
10   curl,
11   cyrus_sasl,
12   libaio,
13   libedit,
14   libev,
15   libevent,
16   libgcrypt,
17   libgpg-error,
18   lz4,
19   ncurses,
20   numactl,
21   openssl,
22   procps,
23   protobuf,
24   valgrind,
25   xxd,
26   zlib,
27   perlPackages,
28   version,
29   hash,
30   fetchSubmodules ? false,
31   extraPatches ? [ ],
32   extraPostInstall ? "",
33   ...
36 stdenv.mkDerivation (finalAttrs: {
37   pname = "percona-xtrabackup";
38   inherit version;
40   src = fetchFromGitHub {
41     owner = "percona";
42     repo = "percona-xtrabackup";
43     rev = "percona-xtrabackup-${finalAttrs.version}";
44     inherit hash fetchSubmodules;
45   };
47   nativeBuildInputs = [
48     bison
49     boost
50     cmake
51     makeWrapper
52     pkg-config
53   ];
55   buildInputs =
56     [
57       (curl.override { inherit openssl; })
58       cyrus_sasl
59       libaio
60       libedit
61       libevent
62       libev
63       libgcrypt
64       libgpg-error
65       lz4
66       ncurses
67       numactl
68       openssl
69       procps
70       protobuf
71       valgrind
72       xxd
73       zlib
74     ]
75     ++ (with perlPackages; [
76       perl
77       DBI
78       DBDmysql
79     ]);
81   patches = extraPatches;
83   cmakeFlags = [
84     "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
85     "-DBUILD_CONFIG=xtrabackup_release"
86     "-DINSTALL_MYSQLTESTDIR=OFF"
87     "-DWITH_BOOST=system"
88     "-DWITH_CURL=system"
89     "-DWITH_EDITLINE=system"
90     "-DWITH_LIBEVENT=system"
91     "-DWITH_LZ4=system"
92     "-DWITH_PROTOBUF=system"
93     "-DWITH_SASL=system"
94     "-DWITH_SSL=system"
95     "-DWITH_ZLIB=system"
96     "-DWITH_VALGRIND=ON"
97     "-DWITH_MAN_PAGES=OFF"
98   ];
100   postInstall =
101     ''
102       wrapProgram "$out"/bin/xtrabackup --prefix PERL5LIB : $PERL5LIB
103       rm -r "$out"/lib/plugin/debug
104     ''
105     + extraPostInstall;
107   passthru.mysqlVersion = lib.versions.majorMinor finalAttrs.version;
109   meta = with lib; {
110     description = "Non-blocking backup tool for MySQL";
111     homepage = "http://www.percona.com/software/percona-xtrabackup";
112     license = licenses.gpl2Only;
113     platforms = platforms.linux;
114     maintainers = teams.flyingcircus.members ++ [ maintainers.izorkin ];
115   };