···11+{ stdenv, fetchurl }:
22+33+stdenv.mkDerivation rec {
44+ name = "fpart-${version}";
55+ version = "0.9.3";
66+77+ src = fetchurl {
88+ url = "http://contribs.martymac.org/fpart/${name}.tar.gz";
99+ sha256 = "0f1vm7c7v9nrd0mnz6qivpnngni6y53b11kvniclqfd25hhw6ggq";
1010+ };
1111+1212+ postInstall = ''
1313+ sed "s|^FPART_BIN=.*|FPART_BIN=\"$out/bin/fpart\"|" \
1414+ -i "$out/bin/fpsync"
1515+ '';
1616+1717+ meta = with stdenv.lib; {
1818+ description = "Split file trees into bags (called \"partitions\")";
1919+ longDescription = ''
2020+ Fpart is a tool that helps you sort file trees and pack them into bags
2121+ (called "partitions").
2222+2323+ It splits a list of directories and file trees into a certain number of
2424+ partitions, trying to produce partitions with the same size and number of
2525+ files. It can also produce partitions with a given number of files or a
2626+ limited size.
2727+2828+ Once generated, partitions are either printed as file lists to stdout
2929+ (default) or to files. Those lists can then be used by third party programs.
3030+3131+ Fpart also includes a live mode, which allows it to crawl very large
3232+ filesystems and produce partitions in live. Hooks are available to act on
3333+ those partitions (e.g. immediatly start a transfer using rsync(1))
3434+ without having to wait for the filesystem traversal job to be finished.
3535+ Used this way, fpart can be seen as a powerful data migration tool.
3636+ '';
3737+ homepage = "http://contribs.martymac.org/";
3838+ license = licenses.bsd2;
3939+ platforms = platforms.unix;
4040+ maintainers = [ maintainers.bjornfor ];
4141+ };
4242+}