git.iko.soy/typeable/nixpkgs
on master help sign in
xjobs: init at 20200726

xjobs reads job descriptions line by line and executes them in parallel. Signed-off-by: Sirio Balmelli <sirio@b-ad.ch> Co-authored-by: legendofmiracles <30902201+legendofmiracles@users.noreply.github.com> Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

commitf088ce558f74c68be13416f356137dca3ffe0b19 authorSirio Balmelli <sirio@b-ad.ch> dateFri 7 May 2021, 10:02 (6 years ago) parent4f51b50
2 files changed+67
pkgs/tools/misc/xjobs/default.nix+65 pkgs/top-level/all-packages.nix+2
pkgs/tools/misc/xjobs/default.nixnew file+65
@@ -0,0 +1,65 @@
1+{ lib, stdenv, fetchurl
2+, flex, installShellFiles, ncurses, which
3+}:
4+
5+stdenv.mkDerivation rec {
6+ pname = "xjobs";
7+ version = "20200726";
8+
9+ src = fetchurl {
10+ url = "mirror://sourceforge//xjobs/files/${pname}-${version}.tgz";
11+ sha256 = "0ay6gn43pnm7r1jamwgpycl67bjg5n87ncl27jb01w2x6x70z0i3";
12+ };
13+
14+ nativeBuildInputs = [
15+ flex
16+ installShellFiles
17+ which
18+ ];
19+ buildInputs = [
20+ ncurses
21+ ];
22+
23+ checkPhase = ''
24+ runHook preCheck
25+ ./${pname} -V
26+ runHook postCheck
27+ '';
28+
29+ installPhase = ''
30+ runHook preInstall
31+ mkdir -p $out/{bin,etc}
32+ install -m755 ${pname} $out/bin/${pname}
33+ install -m644 ${pname}.rc $out/etc/${pname}.rc
34+ installManPage ${pname}.1
35+ runHook postInstall
36+ '';
37+
38+ meta = with lib; {
39+ description = "A program which reads job descriptions line by line and executes them in parallel";
40+ homepage = "https://www.maier-komor.de/xjobs.html";
41+ license = licenses.gpl2Plus;
42+ platforms = platforms.all;
43+ maintainers = [ maintainers.siriobalmelli ];
44+ longDescription = ''
45+ xjobs reads job descriptions line by line and executes them in parallel.
46+
47+ It limits the number of parallel executing jobs and starts new jobs when jobs finish.
48+
49+ Therefore, it combines the arguments from every input line with the utility
50+ and arguments given on the command line.
51+ If no utility is given as an argument to xjobs,
52+ then the first argument on every job line will be used as utility.
53+ To execute utility xjobs searches the directories given in the PATH environment variable
54+ and uses the first file found in these directories.
55+
56+ xjobs is most useful on multi-processor/core machines when one needs to execute
57+ several time consuming command several that could possibly be run in parallel.
58+ With xjobs this can be achieved easily, and it is possible to limit the load
59+ of the machine to a useful value.
60+
61+ It works similar to xargs, but starts several processes simultaneously
62+ and gives only one line of arguments to each utility call.
63+ '';
64+ };
65+}
pkgs/top-level/all-packages.nix+2
@@ -4307,6 +4307,8 @@ in
43074307
43084308 xkcdpass = with python3Packages; toPythonApplication xkcdpass;
43094309
4310+ xjobs = callPackage ../tools/misc/xjobs { };
4311+
43104312 xob = callPackage ../tools/X11/xob { };
43114313
43124314 z-lua = callPackage ../tools/misc/z-lua { };