1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 protobufc,
7 libunwind,
8 lzo,
9 openssl,
10 protobuf,
11 zlib,
12}:
13
14stdenv.mkDerivation rec {
15 pname = "zbackup";
16 version = "1.4.4";
17
18 src = fetchFromGitHub {
19 owner = "zbackup";
20 repo = "zbackup";
21 rev = version;
22 hash = "sha256-9Fk4EhEeQ2J4Kirc7oad4CzmW70Mmza6uozd87qfgZI=";
23 };
24
25 patches = [
26 # compare with https://github.com/zbackup/zbackup/pull/158;
27 # but that doesn't apply cleanly to this version
28 ./protobuf-api-change.patch
29 ];
30
31 # zbackup uses dynamic exception specifications which are not
32 # allowed in C++17
33 env.NIX_CFLAGS_COMPILE = toString [ "--std=c++14" ];
34
35 buildInputs = [
36 zlib
37 openssl
38 protobuf
39 lzo
40 libunwind
41 ];
42 nativeBuildInputs = [
43 cmake
44 protobufc
45 ];
46
47 meta = {
48 description = "Versatile deduplicating backup tool";
49 mainProgram = "zbackup";
50 homepage = "http://zbackup.org/";
51 platforms = lib.platforms.linux;
52 license = lib.licenses.gpl2Plus;
53 };
54}