Mark H Weaver <m...@netris.org> writes:

> 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):
>
>        #:phases (alist-cons-before
>                  'configure 'patch-configure
>                  (lambda _
>                    (substitute* "configure"
>                      (("/usr/bin/file") (which "file"))))
>                  %standard-phases)

I like this much better.  I modelled my initial implementation off what
several other package definitions do.  I might revisit those and propose
some patches.

-- 
`~Eric

Reply via email to