parallel: 20200922 -> 20210122 (#111499)

This commit is contained in:
Aaron Zeng 2021-02-19 05:56:45 -05:00 committed by GitHub
parent ad4db3f4d8
commit 16fed7f1eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 29 deletions

View file

@ -1,21 +1,14 @@
{ fetchurl, lib, stdenv, perl, makeWrapper, procps, coreutils }:
stdenv.mkDerivation rec {
name = "parallel-20200922";
pname = "parallel";
version = "20210122";
src = fetchurl {
url = "mirror://gnu/parallel/${name}.tar.bz2";
sha256 = "0wj19kwjk0hwm8bk9yfcf3rpr0314lmjy5xxlvvdqnbbc4ml2418";
url = "mirror://gnu/parallel/${pname}-${version}.tar.bz2";
sha256 = "1wxkqz6ld1bp0ilvc04vhq99qjay1nl6pbk3qzvp3sjavv9vdwdl";
};
patches = [
./fix-max-line-length-allowed.diff
];
postPatch = ''
substituteInPlace src/parallel --subst-var-by coreutils ${coreutils}
'';
outputs = [ "out" "man" "doc" ];
nativeBuildInputs = [ makeWrapper ];
@ -23,7 +16,7 @@ stdenv.mkDerivation rec {
postInstall = ''
wrapProgram $out/bin/parallel \
--prefix PATH : "${lib.makeBinPath [ procps perl ]}"
--prefix PATH : "${lib.makeBinPath [ procps perl coreutils ]}"
'';
doCheck = true;

View file

@ -1,17 +0,0 @@
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 $?;
}