about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/parallel
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-15 10:30:44 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-15 10:30:44 +0000
commite0794be8a0d11e90461e5a9c85012a36b93ec976 (patch)
treeefd9cbc55ea3322867bf601c4d536758a3dd5fcc /nixpkgs/pkgs/tools/misc/parallel
parent3538874082ded7647b1ccec0343c7c1e882cfef3 (diff)
parent1a57d96edd156958b12782e8c8b6a374142a7248 (diff)
downloadnixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.gz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.bz2
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.lz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.xz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.zst
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.zip
Merge commit '1a57d96edd156958b12782e8c8b6a374142a7248'
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/parallel')
-rw-r--r--nixpkgs/pkgs/tools/misc/parallel/default.nix14
-rw-r--r--nixpkgs/pkgs/tools/misc/parallel/fix-max-line-length-allowed.diff17
2 files changed, 28 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/tools/misc/parallel/default.nix b/nixpkgs/pkgs/tools/misc/parallel/default.nix
index e99f2aa12d5f..45439afe3d11 100644
--- a/nixpkgs/pkgs/tools/misc/parallel/default.nix
+++ b/nixpkgs/pkgs/tools/misc/parallel/default.nix
@@ -1,13 +1,21 @@
-{ fetchurl, stdenv, perl, makeWrapper, procps }:
+{ fetchurl, stdenv, perl, makeWrapper, procps, coreutils }:
 
 stdenv.mkDerivation rec {
-  name = "parallel-20200822";
+  name = "parallel-20200922";
 
   src = fetchurl {
     url = "mirror://gnu/parallel/${name}.tar.bz2";
-    sha256 = "02dy46g6f05p7s2qs8h6yg20p1zl3flxxf77n5jw74l3h1m24m4n";
+    sha256 = "0wj19kwjk0hwm8bk9yfcf3rpr0314lmjy5xxlvvdqnbbc4ml2418";
   };
 
+  patches = [
+    ./fix-max-line-length-allowed.diff
+  ];
+
+  postPatch = ''
+    substituteInPlace src/parallel --subst-var-by coreutils ${coreutils}
+  '';
+
   outputs = [ "out" "man" ];
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/nixpkgs/pkgs/tools/misc/parallel/fix-max-line-length-allowed.diff b/nixpkgs/pkgs/tools/misc/parallel/fix-max-line-length-allowed.diff
new file mode 100644
index 000000000000..c6d501ecb22a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/misc/parallel/fix-max-line-length-allowed.diff
@@ -0,0 +1,17 @@
+Correct path to coreutils echo to fix parallel --max-line-length-allowed.
+
+Author: Bjørn Forsman
+
+diff --git a/src/parallel b/src/parallel
+index a047fd94..9fc5f671 100755
+--- a/src/parallel
++++ b/src/parallel
+@@ -11580,7 +11580,7 @@ sub is_acceptable_command_line_length($$) {
+ 	$len += length $Global::parallel_env;
+     }
+     # Force using non-built-in command
+-    ::qqx("/bin/echo ".${string}x(($len-length "/bin/echo ")/length $string));
++    ::qqx("@coreutils@/bin/echo ".${string}x(($len-length "@coreutils@/bin/echo ")/length $string));
+     ::debug("init", "$len=$? ");
+     return not $?;
+ }