diff options
Diffstat (limited to 'gnu/packages/node.scm')
| -rw-r--r-- | gnu/packages/node.scm | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 2f269d08b17..887ef930ffc 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | ;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com> | 2 | ;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com> |
| 3 | ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> | 3 | ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> |
| 4 | ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org> | 4 | ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org> |
| 5 | ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org> | ||
| 5 | ;;; | 6 | ;;; |
| 6 | ;;; This file is part of GNU Guix. | 7 | ;;; This file is part of GNU Guix. |
| 7 | ;;; | 8 | ;;; |
| @@ -99,7 +100,23 @@ | |||
| 99 | (zero? (apply system* | 100 | (zero? (apply system* |
| 100 | (string-append (assoc-ref inputs "python") | 101 | (string-append (assoc-ref inputs "python") |
| 101 | "/bin/python") | 102 | "/bin/python") |
| 102 | "configure" flags)))))))) | 103 | "configure" flags))))) |
| 104 | (replace 'patch-shebangs | ||
| 105 | (lambda* (#:key outputs #:allow-other-keys #:rest all) | ||
| 106 | ;; Work around <http://bugs.gnu.org/23723>. | ||
| 107 | (let* ((patch (assoc-ref %standard-phases 'patch-shebangs)) | ||
| 108 | (npm (string-append (assoc-ref outputs "out") | ||
| 109 | "/bin/npm")) | ||
| 110 | (target (readlink npm))) | ||
| 111 | (and (apply patch all) | ||
| 112 | (with-directory-excursion (dirname npm) | ||
| 113 | ;; Turn NPM into a symlink to TARGET again, which 'npm' | ||
| 114 | ;; relies on for the resolution of relative file names | ||
| 115 | ;; in JS files. | ||
| 116 | (delete-file target) | ||
| 117 | (rename-file npm target) | ||
| 118 | (symlink target npm) | ||
| 119 | #t)))))))) | ||
| 103 | (native-inputs | 120 | (native-inputs |
| 104 | `(("python" ,python-2) | 121 | `(("python" ,python-2) |
| 105 | ("perl" ,perl) | 122 | ("perl" ,perl) |
