From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: [PATCH 2/2] gnu: tcsh: Use modify-phases. Date: Fri, 24 Feb 2017 03:16:45 -0500 Message-ID: <4c58555031f1a1c287bed3cf4a06054075498017.1487923947.git.leo@famulari.name> References: Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chB3h-00024P-Gu for guix-devel@gnu.org; Fri, 24 Feb 2017 03:16:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chB3d-0005NU-IO for guix-devel@gnu.org; Fri, 24 Feb 2017 03:16:57 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:51737) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1chB3d-0005ND-Cj for guix-devel@gnu.org; Fri, 24 Feb 2017 03:16:53 -0500 Received: from localhost.localdomain (c-73-188-17-148.hsd1.pa.comcast.net [73.188.17.148]) by mail.messagingengine.com (Postfix) with ESMTPA id 8370324357 for ; Fri, 24 Feb 2017 03:16:52 -0500 (EST) In-Reply-To: In-Reply-To: References: 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/shells.scm (tcsh)[arguments]: Use modify-phases. --- gnu/packages/shells.scm | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index d9e0f93a1..ef5ed8040 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -240,32 +240,30 @@ written by Paul Haahr and Byron Rakitzis.") `(("ncurses" ,ncurses))) (arguments `(#:phases - (alist-cons-before - 'check 'patch-test-scripts - (lambda _ - ;; Take care of pwd - (substitute* '("tests/commands.at" "tests/variables.at") - (("/bin/pwd") (which "pwd"))) - ;; The .at files create shell scripts without shebangs. Erk. - (substitute* "tests/commands.at" - (("./output.sh") "/bin/sh output.sh")) - (substitute* "tests/syntax.at" - (("; other_script.csh") "; /bin/sh other_script.csh")) - ;; Now, let's generate the test suite and patch it - (system* "make" "tests/testsuite") + (modify-phases %standard-phases + (add-before 'check 'patch-test-scripts + (lambda _ + ;; Take care of pwd + (substitute* '("tests/commands.at" "tests/variables.at") + (("/bin/pwd") (which "pwd"))) + ;; The .at files create shell scripts without shebangs. Erk. + (substitute* "tests/commands.at" + (("./output.sh") "/bin/sh output.sh")) + (substitute* "tests/syntax.at" + (("; other_script.csh") "; /bin/sh other_script.csh")) + ;; Now, let's generate the test suite and patch it + (system* "make" "tests/testsuite") - ;; This file is ISO-8859-1 encoded. - (with-fluids ((%default-port-encoding #f)) - (substitute* "tests/testsuite" - (("/bin/sh") (which "sh"))))) - (alist-cons-after - 'install 'post-install - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref %outputs "out")) - (bin (string-append out "/bin"))) - (with-directory-excursion bin - (symlink "tcsh" "csh")))) - %standard-phases)))) + ;; This file is ISO-8859-1 encoded. + (with-fluids ((%default-port-encoding #f)) + (substitute* "tests/testsuite" + (("/bin/sh") (which "sh")))))) + (add-after 'install 'post-install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref %outputs "out")) + (bin (string-append out "/bin"))) + (with-directory-excursion bin + (symlink "tcsh" "csh")))))))) (home-page "http://www.tcsh.org/") (synopsis "Unix shell based on csh") (description -- 2.11.1