[Top][All Lists]

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

Re: GNU Bazaar doesn't support the GNU build system

From: Ludovic Courtès
Subject: Re: GNU Bazaar doesn't support the GNU build system
Date: Wed, 23 Jan 2013 16:56:48 +0100
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux)

Nikita Karetnikov <address@hidden> 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)

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.


reply via email to

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