nixpkgs-suyu/pkgs/tools/misc/fpart/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.6 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, autoreconfHook, fts }:
2017-09-17 10:54:58 +02:00
stdenv.mkDerivation rec {
pname = "fpart";
2021-12-11 01:55:18 +01:00
version = "1.4.0";
2017-09-17 10:54:58 +02:00
src = fetchFromGitHub {
owner = "martymac";
repo = "fpart";
rev = "${pname}-${version}";
2021-12-11 01:55:18 +01:00
sha256 = "sha256-O+OV/uhehKMWhND3L7wtIL9lMUSN5bX2YRRD7ftcIGY=";
2017-09-17 10:54:58 +02:00
};
nativeBuildInputs = [ autoreconfHook ];
2020-01-15 15:11:33 +01:00
buildInputs = [ fts ];
2017-09-17 10:54:58 +02:00
postInstall = ''
sed "s|^FPART_BIN=.*|FPART_BIN=\"$out/bin/fpart\"|" \
-i "$out/bin/fpsync"
'';
meta = with lib; {
2017-09-17 10:54:58 +02: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
those partitions (e.g. immediatly start a transfer using rsync(1))
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 ];
};
}