btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / li / libchop / package.nix
blob996c92ef20fcf7543ccb6225365e164dc4cd524b
1 { fetchurl, lib, stdenv, zlib, bzip2, libgcrypt
2 , gdbm, gperf, tdb, gnutls, db, libuuid
3 , lzo, pkg-config, guile, rpcsvc-proto, libtirpc
4 }:
6 stdenv.mkDerivation rec {
7   pname = "libchop";
8   version = "0.5.2";
10   src = fetchurl {
11     url = "mirror://savannah/libchop/libchop-${version}.tar.gz";
12     sha256 = "0fpdyxww41ba52d98blvnf543xvirq1v9xz1i3x1gm9lzlzpmc2g";
13   };
15   patches = [ ./gets-undeclared.patch ./size_t.patch ./0001-Fix-RPC-compilation-when-using-libtirpc-rather-than-.patch ];
17   nativeBuildInputs = [ pkg-config gperf rpcsvc-proto ];
19   env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ];
20   NIX_LDFLAGS = [ "-ltirpc" ];
22   buildInputs =
23     [ zlib bzip2 lzo
24       libgcrypt
25       gdbm db tdb
26       gnutls libuuid
27       guile libtirpc
28     ];
30   doCheck = false;
32   preConfigure = ''
33     sed -re 's%@GUILE@%&/guile%' -i */Makefile.* Makefile.*
34   '';
36   meta = with lib; {
37     description = "Tools & library for data backup and distributed storage";
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     '';
54     homepage = "https://www.nongnu.org/libchop/";
55     license = licenses.gpl3Plus;
56     maintainers = [ ];
57     platforms = platforms.gnu ++ platforms.linux;
58   };