at 24.05-pre 2.1 kB view raw
1{ fetchurl, lib, stdenv, perl, makeWrapper, procps, coreutils, gawk, buildPackages }: 2 3stdenv.mkDerivation rec { 4 pname = "parallel"; 5 version = "20230922"; 6 7 src = fetchurl { 8 url = "mirror://gnu/parallel/${pname}-${version}.tar.bz2"; 9 sha256 = "sha256-EUR0Ft1eXfZQE897RULhQJOKO/1fPzCVye2xaPy/4GM="; 10 }; 11 12 outputs = [ "out" "man" "doc" ]; 13 14 nativeBuildInputs = [ makeWrapper ]; 15 buildInputs = [ perl procps ]; 16 17 postPatch = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 18 substituteInPlace Makefile.in \ 19 --replace '$(DESTDIR)$(bindir)/parallel --shell-completion' '${lib.getExe buildPackages.parallel} --shell-completion' 20 ''; 21 22 preInstall = '' 23 patchShebangs ./src/parallel 24 ''; 25 26 postInstall = '' 27 wrapProgram $out/bin/parallel \ 28 --prefix PATH : "${lib.makeBinPath [ procps perl coreutils gawk ]}" 29 ''; 30 31 doCheck = true; 32 33 meta = with lib; { 34 description = "Shell tool for executing jobs in parallel"; 35 longDescription = 36 '' GNU Parallel is a shell tool for executing jobs in parallel. A job 37 is typically a single command or a small script that has to be run 38 for each of the lines in the input. The typical input is a list of 39 files, a list of hosts, a list of users, or a list of tables. 40 41 If you use xargs today you will find GNU Parallel very easy to use. 42 If you write loops in shell, you will find GNU Parallel may be able 43 to replace most of the loops and make them run faster by running 44 jobs in parallel. If you use ppss or pexec you will find GNU 45 Parallel will often make the command easier to read. 46 47 GNU Parallel makes sure output from the commands is the same output 48 as you would get had you run the commands sequentially. This makes 49 it possible to use output from GNU Parallel as input for other 50 programs. 51 ''; 52 homepage = "https://www.gnu.org/software/parallel/"; 53 license = licenses.gpl3Plus; 54 platforms = platforms.all; 55 maintainers = with maintainers; [ pSub vrthra tomberek ]; 56 mainProgram = "parallel"; 57 }; 58}