about summary refs log tree commit diff
path: root/pkgs/tools/backup/mydumper/default.nix
blob: 451ed58d81858c9ddbe19d802bd6aa225c79acef (plain) (blame)
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
{ lib, stdenv, fetchFromGitHub
, cmake, pkg-config, sphinx
, glib , pcre
, libmysqlclient, libressl
, zlib, zstd
}:

stdenv.mkDerivation rec {
  pname = "mydumper";
  version = "0.14.1-1";

  src = fetchFromGitHub {
    owner  = "mydumper";
    repo = "mydumper";
    rev = "refs/tags/v${version}";
    hash = "sha256-I8COArsIO8+09SNa3DrgoGpvhLj08I8UvT2H9k9mJNQ=";
  };

  outputs = [ "out" "doc" "man" ];

  nativeBuildInputs = [ cmake pkg-config sphinx ];

  buildInputs = [
    glib pcre
    libmysqlclient libressl
    zlib zstd
  ];

  cmakeFlags = [
    "-DCMAKE_SKIP_BUILD_RPATH=ON"
    "-DMYSQL_INCLUDE_DIR=${lib.getDev libmysqlclient}/include/mysql"
    "-DWITH_ZSTD=ON"
  ];

  meta = with lib; {
    description = "High-perfomance MySQL backup tool";
    homepage = "https://github.com/maxbube/mydumper";
    changelog = "https://github.com/mydumper/mydumper/releases/tag/v${version}";
    license = licenses.gpl3Plus;
    platforms = platforms.linux;
    maintainers = with maintainers; [ izorkin ];
  };
}