2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, fts }:
|
2017-09-17 08:54:58 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "fpart";
|
2024-01-23 13:17:12 +00:00
|
|
|
version = "1.6.0";
|
2017-09-17 08:54:58 +00:00
|
|
|
|
2018-11-21 22:05:20 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "martymac";
|
|
|
|
repo = "fpart";
|
2019-08-15 12:41:18 +00:00
|
|
|
rev = "${pname}-${version}";
|
2024-01-23 13:17:12 +00:00
|
|
|
sha256 = "sha256-kAvGLd5W633fRS+qVD/yclreFfcauyLygQGtzv7AP24=";
|
2017-09-17 08:54:58 +00:00
|
|
|
};
|
|
|
|
|
2018-11-21 22:05:20 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2020-01-15 14:11:33 +00:00
|
|
|
buildInputs = [ fts ];
|
2018-11-21 22:05:20 +00:00
|
|
|
|
2017-09-17 08:54:58 +00:00
|
|
|
postInstall = ''
|
|
|
|
sed "s|^FPART_BIN=.*|FPART_BIN=\"$out/bin/fpart\"|" \
|
|
|
|
-i "$out/bin/fpsync"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-09-17 08:54:58 +00:00
|
|
|
description = "Split file trees into bags (called \"partitions\")";
|
|
|
|
longDescription = ''
|
|
|
|
Fpart is a tool that helps you sort file trees and pack them into bags
|
|
|
|
(called "partitions").
|
|
|
|
|
|
|
|
It splits a list of directories and file trees into a certain number of
|
|
|
|
partitions, trying to produce partitions with the same size and number of
|
|
|
|
files. It can also produce partitions with a given number of files or a
|
|
|
|
limited size.
|
|
|
|
|
|
|
|
Once generated, partitions are either printed as file lists to stdout
|
|
|
|
(default) or to files. Those lists can then be used by third party programs.
|
|
|
|
|
|
|
|
Fpart also includes a live mode, which allows it to crawl very large
|
|
|
|
filesystems and produce partitions in live. Hooks are available to act on
|
2022-12-18 00:39:44 +00:00
|
|
|
those partitions (e.g. immediately start a transfer using rsync(1))
|
2017-09-17 08:54:58 +00:00
|
|
|
without having to wait for the filesystem traversal job to be finished.
|
|
|
|
Used this way, fpart can be seen as a powerful data migration tool.
|
|
|
|
'';
|
|
|
|
homepage = "http://contribs.martymac.org/";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|