David Thompson <[email protected]> writes:
> +                 (lambda* (#:key inputs outputs #:allow-other-keys)
> +                   (define (dynamic-link-substitute file lib input)
> +                     (substitute* file
> +                       (("dynamic-link \"lib([a-zA-Z]+)\"" _ lib)
> +                        (string-append "dynamic-link \""
> +                                       (assoc-ref inputs input)
> +                                       "/lib/lib" lib "\""))))

I think the 'substitute*' form binds 'lib' to whatever matched the
pattern ([a-zA-z]+), thus shadowing the 'lib' argument to
'dynamic-link-substitute', so I think you could simply remove that
argument, or no?

> +                   ;; Replace dynamic-link calls for libGL, libGLU, and
> +                   ;; libglut with absolute paths to the store.
> +                   (dynamic-link-substitute "glx/runtime.scm" "GL" "mesa")
> +                   (dynamic-link-substitute "glu/runtime.scm" "GLU" "mesa")
> +                   (dynamic-link-substitute "glut/runtime.scm" "glut"
> +                                            "freeglut"))
> +                 %standard-phases)))

   Thanks!
     Mark

Reply via email to