From: ludo@gnu.org (Ludovic Courtès)
To: Nikita Karetnikov <nikita@karetnikov.org>
Cc: bug-guix@gnu.org
Subject: Re: GNU Bazaar doesn't support the GNU build system
Date: Wed, 23 Jan 2013 16:56:48 +0100 [thread overview]
Message-ID: <87ehhbx58f.fsf@gnu.org> (raw)
In-Reply-To: <874ni8toj4.fsf@karetnikov.org> (Nikita Karetnikov's message of "Wed, 23 Jan 2013 01:13:12 -0500")
Nikita Karetnikov <nikita@karetnikov.org> skribis:
>> I realize this is a bit more involved than “just” packaging the thing,
>> but it will be useful in the long run.
>
> I'm missing the big picture. That's the main problem. What will happen
> when I run 'guix-package -i hello'?
‘build-system’ objects are an abstraction over the underlying build
system. A build system is basically couple of procedures: one to
perform a native build, and one to perform a cross-build (which is not
implemented yet.)
The ‘package-derivation’ procedure takes a package and return its
derivation (see the manual.) To do that, it actually invokes the build
procedure of the package’s build system. When it’s ‘gnu-build-system’,
the build procedure is ‘gnu-build’ from the (guix build-system gnu)
package.
In turn, this ‘gnu-build’ creates a build script that invokes the
build-side ‘gnu-build’–the one from (guix build gnu-build-system). And
from there, you see what happens. (See the manual about “strata”.)
If you want all the details, you can try this:
--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (use-modules (guix store) (guix derivations) (guix packages) (gnu packages base))
scheme@(guile-user)> (define s (open-connection))
scheme@(guile-user)> ,trace (package-derivation s guile-final)
--8<---------------cut here---------------end--------------->8---
Beware, it produces a *lot* of output.
> Let's assume that I'll do the same in 'python-build-system.scm'. Can I
> reuse 'set-paths' and 'unpack'? Should I write my own functions
> instead?
You would probably reuse them, yes. So (guix build python-build-system)
would most likely #:use-module (guix build gnu-build-system), to
facilitate that.
> How can I determine what environment variables and prefixes should be
> used?
You at least need $PATH and $PYTHONPATH, perhaps $LD_LIBRARY_PATH too.
> I've noticed that 'development/python-modules/generic/default.nix' uses
> 'easy_install'. Should we use it?
Probably, though you’d rather ask a Pythoner to check whether this is
still the recommended way.
Ludo’.
prev parent reply other threads:[~2013-01-23 15:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-18 6:53 GNU Bazaar doesn't support the GNU build system Nikita Karetnikov
2013-01-18 13:11 ` Ludovic Courtès
2013-01-19 6:19 ` Nikita Karetnikov
2013-01-19 13:46 ` Ludovic Courtès
2013-01-19 22:50 ` Nikita Karetnikov
2013-01-20 14:26 ` Ludovic Courtès
2013-01-23 6:13 ` Nikita Karetnikov
2013-01-23 15:56 ` Ludovic Courtès [this message]
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ehhbx58f.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=bug-guix@gnu.org \
--cc=nikita@karetnikov.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
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).