* gnu/packages/ld-wrapper.scm: Use @SELF@ instead of $0. This is so
that the .go file is found even when the wrapper is invoked via a
symlink to it.
* gnu/packages/base.scm (make-ld-wrapper): Substitute @SELF@.
(mkdir-p bin)
(copy-file (assoc-ref %build-inputs "wrapper") ld)
(substitute* ld
+ (("@SELF@")
+ ld)
(("@GUILE@")
(string-append (assoc-ref %build-inputs "guile")
"/bin/guile"))
# .go file (see <http://bugs.gnu.org/12519>).
main="(@ (gnu build-support ld-wrapper) ld-wrapper)"
-exec @GUILE@ -c "(load-compiled \"$0.go\") (apply $main (cdr (command-line)))" "$@"
+exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)))" "$@"
!#
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>