mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 15:13:46 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
48 lines
1.6 KiB
Nix
48 lines
1.6 KiB
Nix
{ lib, stdenv, fetchFromGitHub, autoreconfHook, fts }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "fpart";
|
|
version = "1.2.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "martymac";
|
|
repo = "fpart";
|
|
rev = "${pname}-${version}";
|
|
sha256 = "17zm3cgp3f2plynqhj8a0hbma5rvawrx5kqygjqyynn7cljv458v";
|
|
};
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
buildInputs = [ fts ];
|
|
|
|
postInstall = ''
|
|
sed "s|^FPART_BIN=.*|FPART_BIN=\"$out/bin/fpart\"|" \
|
|
-i "$out/bin/fpsync"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
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 ];
|
|
};
|
|
}
|