2021-01-15 22:18:51 +00:00
|
|
|
{ fetchurl, lib, stdenv, perl, makeWrapper, procps, coreutils }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-02-19 19:06:45 +00:00
|
|
|
pname = "parallel";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "20230622";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-02-19 19:06:45 +00:00
|
|
|
url = "mirror://gnu/parallel/${pname}-${version}.tar.bz2";
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-3jokrXAhmKZCEVzrmygGJf1Jxt2IQrCGhf8FfGuEI44=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
outputs = [ "out" "man" "doc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ perl procps ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
preInstall = ''
|
|
|
|
patchShebangs ./src/parallel
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/parallel \
|
2021-02-19 19:06:45 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ procps perl coreutils ]}"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Shell tool for executing jobs in parallel";
|
|
|
|
longDescription =
|
|
|
|
'' GNU Parallel is a shell tool for executing jobs in parallel. A job
|
|
|
|
is typically a single command or a small script that has to be run
|
|
|
|
for each of the lines in the input. The typical input is a list of
|
|
|
|
files, a list of hosts, a list of users, or a list of tables.
|
|
|
|
|
|
|
|
If you use xargs today you will find GNU Parallel very easy to use.
|
|
|
|
If you write loops in shell, you will find GNU Parallel may be able
|
|
|
|
to replace most of the loops and make them run faster by running
|
|
|
|
jobs in parallel. If you use ppss or pexec you will find GNU
|
|
|
|
Parallel will often make the command easier to read.
|
|
|
|
|
|
|
|
GNU Parallel makes sure output from the commands is the same output
|
|
|
|
as you would get had you run the commands sequentially. This makes
|
|
|
|
it possible to use output from GNU Parallel as input for other
|
|
|
|
programs.
|
|
|
|
'';
|
|
|
|
homepage = "https://www.gnu.org/software/parallel/";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ pSub vrthra tomberek ];
|
|
|
|
};
|
|
|
|
}
|