1{ fetchurl, stdenv, perl, makeWrapper, procps }:
2
3stdenv.mkDerivation rec {
4 name = "parallel-20180122";
5
6 src = fetchurl {
7 url = "mirror://gnu/parallel/${name}.tar.bz2";
8 sha256 = "1wkbppb4mc56grl6jsp803sf0hm7mg5ff7qmxalp7sd0vxqw41p9";
9 };
10
11 nativeBuildInputs = [ makeWrapper perl ];
12
13 postInstall = ''
14 wrapProgram $out/bin/parallel \
15 ${if stdenv.isLinux then ("--prefix PATH \":\" ${procps}/bin") else ""} \
16 --prefix PATH : "${perl}/bin" \
17 '';
18
19 doCheck = true;
20
21 meta = with stdenv.lib; {
22 description = "Shell tool for executing jobs in parallel";
23 longDescription =
24 '' GNU Parallel is a shell tool for executing jobs in parallel. A job
25 is typically a single command or a small script that has to be run
26 for each of the lines in the input. The typical input is a list of
27 files, a list of hosts, a list of users, or a list of tables.
28
29 If you use xargs today you will find GNU Parallel very easy to use.
30 If you write loops in shell, you will find GNU Parallel may be able
31 to replace most of the loops and make them run faster by running
32 jobs in parallel. If you use ppss or pexec you will find GNU
33 Parallel will often make the command easier to read.
34
35 GNU Parallel makes sure output from the commands is the same output
36 as you would get had you run the commands sequentially. This makes
37 it possible to use output from GNU Parallel as input for other
38 programs.
39 '';
40 homepage = http://www.gnu.org/software/parallel/;
41 license = licenses.gpl3Plus;
42 platforms = platforms.all;
43 maintainers = with maintainers; [ pSub vrthra ];
44 };
45}