Eric Bavier <ericbav...@gmail.com> writes:

> +       #:phases
> +       (alist-replace
> +        'configure
> +        (lambda* (#:key #:allow-other-keys #:rest args)
> +          (let ((configure (assoc-ref %standard-phases 'configure)))
> +            (substitute* "configure"
> +              (("/usr/bin/file") (which "file")))
> +            (apply configure args)))
> +        %standard-phases)))

The complex 'lambda*' above could be replaced by "lambda args".
However:

Instead of replacing the 'configure' phase with a new one that ends by
calling the standard 'configure' phase, why not just add a new phase
before 'configure'?  Something like this (untested):

--8<---------------cut here---------------start------------->8---
       #:phases (alist-cons-before
                 'configure 'patch-configure
                 (lambda _
                   (substitute* "configure"
                     (("/usr/bin/file") (which "file"))))
                 %standard-phases)
--8<---------------cut here---------------end--------------->8---

     Mark

Reply via email to