From 1d77141f6d5004cf10d1f9ead53855f25a973847 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 29 Dec 2020 14:24:50 +0100 Subject: gnu: node: Fix npx shebang. * gnu/packages/node.scm (node)[arguments]: Add build phase "patch-node-shebang". --- gnu/packages/node.scm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gnu') diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index f04e39bbd5..9e07cd906e 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018, 2019, 2020 Marius Bakke ;;; Copyright © 2020 Pierre Langlois +;;; Copyright © 2020 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -170,6 +171,14 @@ (target (readlink npm))) (with-directory-excursion bindir (patch-shebang target (list bindir)) + #t)))) + (add-after 'install 'patch-node-shebang + (lambda* (#:key outputs #:allow-other-keys) + (let* ((bindir (string-append (assoc-ref outputs "out") + "/bin")) + (npx (readlink (string-append bindir "/npx")))) + (with-directory-excursion bindir + (patch-shebang npx (list bindir)) #t))))))) (native-inputs `(("python" ,python-2) -- cgit v1.2.3