guix-devel
[Top][All Lists]
Advanced

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

Re: Internship on Improve the user experience for the "guix package" com


From: Vijayalakshmi Vedantham
Subject: Re: Internship on Improve the user experience for the "guix package" command line tool (Outreachy)
Date: Mon, 19 Mar 2018 22:28:27 +0530

Got it. CC-ing them.

I created a patch file for the package definition of python-logwrap that I'm including here. I'm a little unsure if my patch is right because my ./pre-inst-env.in guix build r-abbyyR fails with some error.


Also, since we are going to be communicating regularly now,
1. I'd like to know the best times to contact you.
2. I need some help finishing my Outreachy application, so anytime in the next 2 days if you could set aside an hour for us to discuss the goals of the project etc it'll be great.

Thanks,
Vijayalakshmi

On Mon, Mar 19, 2018 at 6:10 AM, Ricardo Wurmus <address@hidden> wrote:

Hi Vijayalakshmi,

Thanks again for your first successful contribution to Guix!  Don’t
forget to record your contribution on the Outreachy website.

You may have noticed that there was a lot of output when running “guix
build r-abbyyr”.  The same is true when running “guix package -i
r-abbyyr”, which will install the package into your default profile
after building it (when no pre-built package is offered by our build
farm).  The project’s goal – among others — is to make all this output
less intimidating, especially when using “guix package -i”.

> I'm excited to continue working. What other tasks do you have in mind?
> Should I add more packages or do something else?

Let’s take a closer look at the package you created.

The whole thing is a variable definition.  You defined the public
variable “r-abbyyr” and bound a package value to it.  In Scheme that’s
how you define a variable with the name “a” and a value of 12:

    (define a 12)

Your package definition is not so different from that:

    (define r-abbyyr (package …))

In Scheme whatever thing comes first in a parenthetical _expression_ is
usually either a procedure or a special form.  If it is a procedure,
everything that follows is an argument.  Here’s an example:

    (+ 1 2 3 4 5 10)

The first element in this _expression_ is “+”, which is a procedure that
adds its arguments.  All the numbers that follow are arguments to that
procedure.  When this _expression_ is evaluated, the result is the sum of
all these numbers: 15.

“package” is a special form that takes a bunch of fields and values and
produces a package object.  Let’s look at one particular field that the
“package” form provides: the “build-system” field.

As an R package “r-abbyyr” used the “r-build-system”.  The value of the
“r-build-system” variable is defined in “guix/build-system/r.scm”, and
it completely describes how an R package is to be built with Guix.  We
support more build systems in Guix, but all of them have the same
features in common: they all provide so-called build phases that are
executed in order.  Each build phase is just a procedure.

As a next task I would suggest to browse the source code of Guix to see
what build systems are offered by Guix.  The build phases for the R
build system, for example, are defined as “%standard-phases” in
“guix/build/r-build-system.scm”.

Maybe you can try to create a package definition for another application
that uses a different build system.  How about a simple Python package
from pypi?  Where are the build phases for a Python package defined?
What is the build system that is used for Python packages?

PS: what do you think about Cc-ing the public address@hidden mailing
list for future communication?  The benefit is that this list is
archived and accessible by anyone, such as future contributors.  And in
case I make a mistake and explain something poorly others will have a
chance to correct me :)

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net



Attachment: 0002-gnu-Add-python-logwrap.patch
Description: Text Data


reply via email to

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