all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Cyril Roelandt <tipecaml@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 1/2] gnu: Add datefudge.
Date: Sat, 17 Aug 2013 23:36:16 +0200	[thread overview]
Message-ID: <87eh9suhin.fsf@gnu.org> (raw)
In-Reply-To: <520F8895.9090200@gmail.com> (Cyril Roelandt's message of "Sat, 17 Aug 2013 16:28:37 +0200")

Cyril Roelandt <tipecaml@gmail.com> skribis:

> On 08/16/2013 07:45 PM, Ludovic Courtès wrote:
>> Cyril Roelandt <tipecaml@gmail.com> skribis:
>>
>>> +        (alist-replace
>>> +         'configure
>>> +         (lambda* (#:key version outputs #:allow-other-keys #:rest args)
>>> +          (pk version outputs)
>>
>> Leftover debugging statements, and ‘version’ doesn’t exist.
>>
>> What you can do is use:
>>
>>    (arguments
>>      `( ...
>>         ,version
>>         ...
>>        ))
>>
>> to paste the ‘version’ field of the package being defined in the
>> quasiquote expression.
>>
>
> What kind of whitchcraft is this ? This works but I have no idea
> why. I don't think that Duckduckgoing "GNU Guile ," will give me any
> interesting results, so would you care to explain how this works, or
> redirect me to the appropriate documentation ?

It’s not witchcraft, it’s Scheme!  :-)

Basically ` is “quasiquote”, and , (coma) is “unquote”.  Think of

  echo "ls $foo"

See the manual for details (info "(guile) Expression Syntax"), or see
the occurrences of ,name and ,version in ttf-freefont in xorg.scm for an
example.

>>> +    (inputs `(("perl" ,perl))) ; Needed for the tests.
>>
>> ‘native-inputs’, probably (if it were being cross-compiled, you’d want
>> to run the native Perl, right?).
>>
>
> Not sure about the difference between inputs and native-inputs. I
> think we may want to improve the documentation:
>
> $ git grep native-inputs doc/

Agreed.

To illustrate the difference, here’s an example.  Suppose you have a C
program with a Bison-generated C file.  When cross-compiling that
program, you want the native Bison, so that the ‘bison’ program can run
at compile-time; conversely, the resulting executable must be linked
against the target libc–the libc that will actually be used at run time
on the target architecture.

In that case, Bison should be listed in ‘native-inputs’, whereas ‘libc’
should be listed in ‘inputs’ (which it is, implicitly.)

HTH,
Ludo’.

  reply	other threads:[~2013-08-17 21:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-15 21:58 [PATCH 0/2] Add datefudge to gnutls inputs Cyril Roelandt
2013-08-15 21:58 ` [PATCH 1/2] gnu: Add datefudge Cyril Roelandt
2013-08-16 17:45   ` Ludovic Courtès
2013-08-17 14:28     ` Cyril Roelandt
2013-08-17 21:36       ` Ludovic Courtès [this message]
2013-08-15 21:58 ` [PATCH 2/2] gnutls: add datefudge to the inputs Cyril Roelandt
2013-08-16 17:46   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eh9suhin.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=tipecaml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.