1{ fetchurl, lib, stdenv, zlib, bzip2, libgcrypt
2, gdbm, gperf, tdb, gnutls, db, libuuid
3, lzo, pkg-config, guile, rpcsvc-proto, libtirpc
4}:
5
6stdenv.mkDerivation rec {
7 pname = "libchop";
8 version = "0.5.2";
9
10 src = fetchurl {
11 url = "mirror://savannah/libchop/libchop-${version}.tar.gz";
12 sha256 = "0fpdyxww41ba52d98blvnf543xvirq1v9xz1i3x1gm9lzlzpmc2g";
13 };
14
15 patches = [ ./gets-undeclared.patch ./size_t.patch ./0001-Fix-RPC-compilation-when-using-libtirpc-rather-than-.patch ];
16
17 nativeBuildInputs = [ pkg-config gperf rpcsvc-proto ];
18
19 env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ];
20 NIX_LDFLAGS = [ "-ltirpc" ];
21
22 buildInputs =
23 [ zlib bzip2 lzo
24 libgcrypt
25 gdbm db tdb
26 gnutls libuuid
27 guile libtirpc
28 ];
29
30 doCheck = false;
31
32 preConfigure = ''
33 sed -re 's%@GUILE@%&/guile%' -i */Makefile.* Makefile.*
34 '';
35
36 meta = with lib; {
37 description = "Tools & library for data backup and distributed storage";
38
39 longDescription =
40 '' Libchop is a set of utilities and library for data backup and
41 distributed storage. Its main application is chop-backup, an
42 encrypted backup program that supports data integrity checks,
43 versioning at little cost, distribution among several sites,
44 selective sharing of stored data, adaptive compression, and more.
45 The library itself, which chop-backup builds upon, implements
46 storage techniques such as content-based addressing, content hash
47 keys, Merkle trees, similarity detection, and lossless compression.
48 It makes it easy to combine them in different ways. The
49 ‘chop-archiver’ and ‘chop-block-server’ tools, illustrated in the
50 manual, provide direct access to these facilities from the command
51 line. It is written in C and has Guile (Scheme) bindings.
52 '';
53
54 homepage = "https://www.nongnu.org/libchop/";
55 license = licenses.gpl3Plus;
56 maintainers = with maintainers; [ ];
57 platforms = platforms.gnu ++ platforms.linux;
58 };
59}