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