aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/node.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-07-20 11:42:02 +0200
committerLudovic Courtès <ludo@gnu.org>2016-07-20 11:42:17 +0200
commit7575655212ecfbcd1f04e429c8a7a41f8720d027 (patch)
tree558982d3cf50ef6b19ef293850de1f485fde66a6 /gnu/packages/node.scm
parent5d4c90ae02f1e0b42d575bba2d828d63aaf79be5 (diff)
parent5f01078129f4eaa4760a14f22761cf357afb6738 (diff)
downloadpatches-7575655212ecfbcd1f04e429c8a7a41f8720d027.tar
patches-7575655212ecfbcd1f04e429c8a7a41f8720d027.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/node.scm')
-rw-r--r--gnu/packages/node.scm19
1 files changed, 18 insertions, 1 deletions
diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm
index 2f269d08b1..887ef930ff 100644
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
+;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -99,7 +100,23 @@
(zero? (apply system*
(string-append (assoc-ref inputs "python")
"/bin/python")
- "configure" flags))))))))
+ "configure" flags)))))
+ (replace 'patch-shebangs
+ (lambda* (#:key outputs #:allow-other-keys #:rest all)
+ ;; Work around <http://bugs.gnu.org/23723>.
+ (let* ((patch (assoc-ref %standard-phases 'patch-shebangs))
+ (npm (string-append (assoc-ref outputs "out")
+ "/bin/npm"))
+ (target (readlink npm)))
+ (and (apply patch all)
+ (with-directory-excursion (dirname npm)
+ ;; Turn NPM into a symlink to TARGET again, which 'npm'
+ ;; relies on for the resolution of relative file names
+ ;; in JS files.
+ (delete-file target)
+ (rename-file npm target)
+ (symlink target npm)
+ #t))))))))
(native-inputs
`(("python" ,python-2)
("perl" ,perl)