Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 89 lines 2.3 kB view raw
1{ 2 fetchurl, 3 lib, 4 stdenv, 5 perl, 6 makeWrapper, 7 procps, 8 coreutils, 9 gawk, 10 buildPackages, 11}: 12 13stdenv.mkDerivation rec { 14 pname = "parallel"; 15 version = "20250722"; 16 17 src = fetchurl { 18 url = "mirror://gnu/parallel/parallel-${version}.tar.bz2"; 19 hash = "sha256-kagf9BKc31rTw8RewDPnXyu+pUR/S2gToNjP6OXHhDs="; 20 }; 21 22 outputs = [ 23 "out" 24 "man" 25 "doc" 26 ]; 27 28 strictDeps = true; 29 nativeBuildInputs = [ 30 makeWrapper 31 perl 32 ]; 33 buildInputs = [ 34 perl 35 procps 36 ]; 37 38 postPatch = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 39 substituteInPlace Makefile.in \ 40 --replace '$(DESTDIR)$(bindir)/parallel --shell-completion' '${lib.getExe buildPackages.parallel} --shell-completion' 41 ''; 42 43 preInstall = '' 44 patchShebangs ./src/parallel 45 ''; 46 47 postInstall = '' 48 wrapProgram $out/bin/parallel \ 49 --prefix PATH : "${ 50 lib.makeBinPath [ 51 procps 52 perl 53 coreutils 54 gawk 55 ] 56 }" 57 ''; 58 59 doCheck = true; 60 61 meta = with lib; { 62 description = "Shell tool for executing jobs in parallel"; 63 longDescription = '' 64 GNU Parallel is a shell tool for executing jobs in parallel. A job 65 is typically a single command or a small script that has to be run 66 for each of the lines in the input. The typical input is a list of 67 files, a list of hosts, a list of users, or a list of tables. 68 69 If you use xargs today you will find GNU Parallel very easy to use. 70 If you write loops in shell, you will find GNU Parallel may be able 71 to replace most of the loops and make them run faster by running 72 jobs in parallel. If you use ppss or pexec you will find GNU 73 Parallel will often make the command easier to read. 74 75 GNU Parallel makes sure output from the commands is the same output 76 as you would get had you run the commands sequentially. This makes 77 it possible to use output from GNU Parallel as input for other 78 programs. 79 ''; 80 homepage = "https://www.gnu.org/software/parallel/"; 81 license = licenses.gpl3Plus; 82 platforms = platforms.all; 83 maintainers = with maintainers; [ 84 pSub 85 tomberek 86 ]; 87 mainProgram = "parallel"; 88 }; 89}