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