guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patches for midnight commander


From: Eric Bavier
Subject: Re: Patches for midnight commander
Date: Wed, 26 Mar 2014 09:20:34 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Mark H Weaver <address@hidden> writes:

> Eric Bavier <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]