guix-devel
[Top][All Lists]
Advanced

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

Re: Blog: Guix packaging tutorial


From: Pierre Neidhardt
Subject: Re: Blog: Guix packaging tutorial
Date: Sun, 30 Sep 2018 21:01:29 +0200
User-agent: mu4e 1.0; emacs 26.1

address@hidden (Ludovic Courtès) writes:
> I’m not sure what you mean by “generated in scope”.
>
> The ‘%’ convention is just a convention (and Andy and I realized a while
> back we interpreted the convention differently :-)) so we shouldn’t draw
> too much from that.
>
> Regarding ‘%build-inputs’ and ‘%outputs’, I think it’s enough to say
> that these are global variables.  Whether they are in scope depends on
> whether a local variable shadows them.
>
> Does that make sense?

I borrowed the expression "generated in scope" from Pjotr's
https://gitlab.com/pjotrp/guix-notes/blob/master/HACKING.org.

Are they really "global" variables?  My (quick) understanding from
derivations.scm is that the %-prefixed variables are defined at
derivation-time.  I think it's important to make this explicit.  What do you
think?

address@hidden (Ludovic Courtès) writes:
> Another option is to skip propagated inputs altogether.

I think it's important to highlight the distinction between the three kinds of
inputs.
When I got started, I was tempted to use propagated-inputs all the way.  The
distinction is very Guix-specific (Nix?) and is one of the lesser known strength
of Guix in my opinion.

address@hidden (Ludovic Courtès) writes:
> When would you like it to be on line?

Well, as soon as possible :)  Monday 1st, maybe?

Ricardo Wurmus <address@hidden> writes:
> I wonder if a complicated example like that really has a place in a
> tutorial.  To me it seems a bit scary.  I image people who are used to
> Conda to browse the tutorial and recoil in horror at seeing a
> complicated example with all sorts of customizations.

In my opinion the "my-mg" example is not so long, although I could probably
remove some phase code because they don't add much to the tutorial.
But for the rest of it, it's rather widespread, idiomatic code.  I don't think
we can afford to remove much of it lest we make this tutorial useless for any
serious work.

Is there any specific element you'd like to cut off?

Also consider that the first part of this tutorial focuses on a hello-world
example that puts emphasis and getting an example up and running as soon as
possible.

What about splitting this tutorial in two separate blog entries and leaving the
advanced example for the second one?

Ricardo Wurmus <address@hidden> writes:
> FWIW, I think that maybe we should avoid quasi-quotation in the
> tutorial, or at least at this point.  It could be a little overwhelming
> to be introduced to so many new concepts at once before seeing how they
> might be useful.

I am not sure about this.  On the one hand, it adds some complexity especially
to users unfamiliar with Lisp.  On the other hand, quasi-quotes are all over the
place.

Ricardo Wurmus <address@hidden> writes:
> Maybe this could be interleaved and motivated by packaging features.
> For example, at the very beginning we define a package and then evaluate
> it at the end so that we can use it with “guix package -f”.  Maybe it
> would be better to avoid defining things and using the plain “package”
> form.

It would be more structured (and thus clearer), but it could also make the
tutorial a few lines longer...  I'll see if I can manage without adding too
much.

Ricardo Wurmus <address@hidden> writes:
> (I need to go now, but if you want I can comment on the next sections
> tomorrow.)

Please do! :)

Ludovic, Ricardo, I've taken all your other considerations into account.  Thanks
a lot for your time reviewing this!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

Attachment: signature.asc
Description: PGP signature


reply via email to

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