btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / fp / fpart / package.nix
blobfe58413443f262e5b27b915d08378131521177aa
1 { lib, stdenv, fetchFromGitHub, autoreconfHook, fts }:
3 stdenv.mkDerivation rec {
4   pname = "fpart";
5   version = "1.6.0";
7   src = fetchFromGitHub {
8     owner = "martymac";
9     repo = "fpart";
10     rev = "fpart-${version}";
11     sha256 = "sha256-kAvGLd5W633fRS+qVD/yclreFfcauyLygQGtzv7AP24=";
12   };
14   nativeBuildInputs = [ autoreconfHook ];
15   buildInputs = [ fts ];
17   postInstall = ''
18     sed "s|^FPART_BIN=.*|FPART_BIN=\"$out/bin/fpart\"|" \
19         -i "$out/bin/fpsync"
20   '';
22   meta = with lib; {
23     description = "Split file trees into bags (called \"partitions\")";
24     longDescription = ''
25       Fpart is a tool that helps you sort file trees and pack them into bags
26       (called "partitions").
28       It splits a list of directories and file trees into a certain number of
29       partitions, trying to produce partitions with the same size and number of
30       files. It can also produce partitions with a given number of files or a
31       limited size.
33       Once generated, partitions are either printed as file lists to stdout
34       (default) or to files. Those lists can then be used by third party programs.
36       Fpart also includes a live mode, which allows it to crawl very large
37       filesystems and produce partitions in live. Hooks are available to act on
38       those partitions (e.g. immediately start a transfer using rsync(1))
39       without having to wait for the filesystem traversal job to be finished.
40       Used this way, fpart can be seen as a powerful data migration tool.
41     '';
42     homepage = "http://contribs.martymac.org/";
43     license = licenses.bsd2;
44     platforms = platforms.unix;
45     maintainers = [ maintainers.bjornfor ];
46   };