From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: [PATCH 01/22] gnu: parallel: Use full paths for executables. Date: Wed, 27 Jul 2016 22:54:02 +1000 Message-ID: References: <20160727125423.7768-1-donttrustben@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSOMK-00081x-QP for guix-devel@gnu.org; Wed, 27 Jul 2016 08:54:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSOMI-0004Fr-IT for guix-devel@gnu.org; Wed, 27 Jul 2016 08:54:47 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:33446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSOMI-0004FZ-BK for guix-devel@gnu.org; Wed, 27 Jul 2016 08:54:46 -0400 Received: by mail-pf0-x242.google.com with SMTP id i6so1841662pfe.0 for ; Wed, 27 Jul 2016 05:54:46 -0700 (PDT) Received: from localhost.localdomain ([103.25.181.216]) by smtp.googlemail.com with ESMTPSA id o80sm9177941pfa.67.2016.07.27.05.54.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Jul 2016 05:54:44 -0700 (PDT) In-Reply-To: <20160727125423.7768-1-donttrustben@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/parallel.scm (parallel)[inputs]: Add procps. [arguments]: New field. --- gnu/packages/parallel.scm | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm index 12f0028..3bb078e 100644 --- a/gnu/packages/parallel.scm +++ b/gnu/packages/parallel.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2016 Pjotr Prins ;;; Copyright © 2016 Andreas Enge ;;; Copyright © 2016 Ricardo Wurmus +;;; Copyright © 2016 Ben Woodcroft ;;; ;;; This file is part of GNU Guix. ;;; @@ -54,7 +55,31 @@ (base32 "08gm0i9vj2nz8qgqi98z00myypgb3dni0s5yf3l17fp8h78fp4g3")))) (build-system gnu-build-system) - (inputs `(("perl" ,perl))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-bin-sh + (lambda _ + (for-each + (lambda (file) + (substitute* file + ;; Patch hard coded '/bin/sh' in the lin ending in: + ;; $Global::shell = $ENV{'PARALLEL_SHELL'} || + ;; parent_shell($$) || $ENV{'SHELL'} || "/bin/sh"; + (("/bin/sh\\\";\n$") (string-append (which "sh") "\";\n")) + ;; Patch call to 'ps' and 'perl' commands. + ((" ps ") (string-append " " (which "ps") " ")) + ((" perl -") (string-append " " (which "perl") " -")))) + (list "src/parallel" "src/sem")))) + (add-after 'install 'post-install-test + (lambda* (#:key outputs #:allow-other-keys) + (zero? (system* (string-append + (assoc-ref outputs "out") "/bin/parallel") + "echo" + ":::" "1" "2" "3"))))))) + (inputs + `(("perl" ,perl) + ("procps" ,procps))) (home-page "http://www.gnu.org/software/parallel/") (synopsis "Build and execute command lines in parallel") (description -- 2.9.1