From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jelle Licht Subject: Re: [PATCH] gnu: node: Correctly patch npm shebang. Date: Wed, 15 Jun 2016 13:03:59 +0200 Message-ID: <87a8imlnmo.fsf@gmail.com> References: <87d1nilp32.fsf@gmail.com> <87bn32lori.fsf@gmail.com> <20160615105711.GA6907@debian-netbook> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bD8c9-00072I-KO for guix-devel@gnu.org; Wed, 15 Jun 2016 07:04:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bD8c5-0002cn-7M for guix-devel@gnu.org; Wed, 15 Jun 2016 07:04:04 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:34746) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bD8c4-0002cd-WC for guix-devel@gnu.org; Wed, 15 Jun 2016 07:04:01 -0400 Received: by mail-wm0-x244.google.com with SMTP id 187so3071573wmz.1 for ; Wed, 15 Jun 2016 04:04:00 -0700 (PDT) In-reply-to: <20160615105711.GA6907@debian-netbook> 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: Efraim Flashner Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Efraim Flashner writes: > On Wed, Jun 15, 2016 at 12:39:29PM +0200, Jelle Licht wrote: >> >> Jelle Licht writes: >> >> > * gnu/packages/node.scm (node): Correctly patch npm shebang. >> > --- >> > gnu/packages/node.scm | 6 ++++++ >> > 1 file changed, 6 insertions(+) >> > >> > diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm >> > index 2f269d0..2cedda8 100644 >> > --- a/gnu/packages/node.scm >> > +++ b/gnu/packages/node.scm >> > @@ -51,8 +51,14 @@ >> >> This patch should be applied to core-updates, as it depends on the >> correct handling of symlinks in the `patch-shebangs' phase introduced by >> Ludo's recent patch [1]. >> >> Thanks, >> - Jelle >> >> [1]https://lists.gnu.org/archive/html/bug-guix/2016-06/msg00043.html >> > > I think you forgot to attach the patch :) It was in the first message body, but for good measure: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-gnu-node-Correctly-patch-npm-shebang.patch Content-Description: patch file >From d01a35d3ef5b2619807b666e4f4126143a0bf08a Mon Sep 17 00:00:00 2001 From: Jelle Licht Date: Wed, 15 Jun 2016 12:22:40 +0200 Subject: [PATCH] gnu: node: Correctly patch npm shebang. To: guix-devel@gnu.org * gnu/packages/node.scm (node): Correctly patch npm shebang. --- gnu/packages/node.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 2f269d0..2cedda8 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -51,8 +51,14 @@ "--shared-zlib" "--shared-libuv" "--without-snapshot") + ;#:tests? #f #:phases (modify-phases %standard-phases + (add-after 'patch-shebangs 'patch-npm-shebang + (lambda* (#:key outputs #:allow-other-keys) + ;; XXX: patch-shebangs does not patch this file by default + (let ((out (assoc-ref outputs "out"))) + (patch-shebang (string-append out "/lib/node_modules/npm/bin/npm-cli.js") (list (string-append out "/bin")))))) (add-before 'configure 'patch-files (lambda* (#:key inputs #:allow-other-keys) ;; Fix hardcoded /bin/sh references. -- 2.8.4 --=-=-=--