unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Contributing to Package Definitions
@ 2018-03-18 11:07 sahi
  2018-03-18 15:42 ` Ricardo Wurmus
  0 siblings, 1 reply; 2+ messages in thread
From: sahi @ 2018-03-18 11:07 UTC (permalink / raw)
  To: help-guix

Hi

I am a newbie, trying to contribute to Guix.

I have setup Guix on my debian
Tested building a package successfully.

Also imported a package definition as a test, which resulted a Scheme Code.

How should i proceed further to contribute.

Regards
Sahithi

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Contributing to Package Definitions
  2018-03-18 11:07 Contributing to Package Definitions sahi
@ 2018-03-18 15:42 ` Ricardo Wurmus
  0 siblings, 0 replies; 2+ messages in thread
From: Ricardo Wurmus @ 2018-03-18 15:42 UTC (permalink / raw)
  To: sahi; +Cc: help-guix


Hi Sahithi,

I’ve already replied to the email you’ve sent me earlier, so to avoid
confusion, here’s the response I sent earlier:

> Also imported a package definition as a test, which resulted a Scheme Code.

The Scheme code is a package definition.  As you can see, package
definitions are not just plain data, but evaluate to a package object in
Scheme.  To add a package definition to Guix, you first need to fetch
the source code from git and compile it:

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

You can use Guix to get an environment for compiling Guix:

    guix environment guix

This will drop you in a sub-shell where all dependencies you need for
Guix are available, so all you need to do is run “./bootstrap”,
“./configure --localstatedir=/var”, and “make” (do not “make install”).
Then you can modify a file under “gnu/packages” to add a new package
definition.

Since we already have a package definition for the “hello” package, you
may want to package something else.  My suggestion is to package an R
package from CRAN.  We have a bunch of R packages in
“gnu/packages/cran.scm”, but also in “gnu/packages/statistics.scm”.  You
can use “guix import cran -r PACKAGE” to recursively generate package
definitions for “PACKAGE” and its dependencies.

You can browse the CRAN here:

    https://cran.r-project.org/web/packages/

I suggest using the “cran” importer because its output is usually
high-quality and R packages are usually relatively simple.  When adding
the output to “gnu/packages/cran.scm” please check and adjust the
license field (sometimes it only generates “#f” as the license, i.e. a
“false” value); you will need to prefix the license with “license:”
because we import the license values with that prefix (see the module
definition at the very top of the file).  Also make sure that the
description field contains complete sentences (the CRAN descriptions
often use sentence fragments).

After adding the package definition, try building it with

    ./pre-inst-env guix build the-package

The “pre-inst-env” script tells Guix to use the local source code
checkout instead of the version you installed.

When this works run “guix lint” on the package definition to check for
errors.  When you’re satisfied, please make one commit per package
definition and export them as patches with “git format-patch” (e.g. “git
format-patch -1” for generating a patch for the last commit).  Then send
the patch to “guix-patches@gnu.org” and please put me in Cc.

For the Outreachy contribution sending a single patch is sufficient.

Please let me know if any of these steps is unclear.  Also feel free to
ask for help on the #guix IRC channel.  People there might be more
responsive than me if you need help at times when I’m not available.

--
Ricardo

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-18 15:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-18 11:07 Contributing to Package Definitions sahi
2018-03-18 15:42 ` Ricardo Wurmus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).