aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2020-12-29 14:24:50 +0100
committerRicardo Wurmus <rekado@elephly.net>2020-12-29 14:26:52 +0100
commit1d77141f6d5004cf10d1f9ead53855f25a973847 (patch)
treef4361ae05b3c4f5e33e34f383b4cfbb7b60bc699 /gnu
parentac80cbfab69b59d17fcf38ef9f4ce0acc0e5f9e6 (diff)
downloadguix-1d77141f6d5004cf10d1f9ead53855f25a973847.tar.gz
guix-1d77141f6d5004cf10d1f9ead53855f25a973847.zip
gnu: node: Fix npx shebang.
* gnu/packages/node.scm (node)[arguments]: Add build phase "patch-node-shebang".
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/node.scm9
1 files changed, 9 insertions, 0 deletions
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 <me@tobias.gr>
;;; Copyright © 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; 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)