From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: GNU Bazaar doesn't support the GNU build system Date: Wed, 23 Jan 2013 16:56:48 +0100 Message-ID: <87ehhbx58f.fsf@gnu.org> References: <87r4lj7ziv.fsf@karetnikov.org> <87fw1y7i1n.fsf@gnu.org> <87libp8zkl.fsf@karetnikov.org> <87wqv91e1g.fsf@gnu.org> <87mww4bxdj.fsf@karetnikov.org> <871udgvsla.fsf@gnu.org> <874ni8toj4.fsf@karetnikov.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:60095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty2hI-0001TP-VX for bug-guix@gnu.org; Wed, 23 Jan 2013 10:57:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ty2hE-00019E-6M for bug-guix@gnu.org; Wed, 23 Jan 2013 10:57:08 -0500 Received: from mail1-relais-roc.national.inria.fr ([192.134.164.82]:49108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty2hD-00018t-Vd for bug-guix@gnu.org; Wed, 23 Jan 2013 10:57:04 -0500 In-Reply-To: <874ni8toj4.fsf@karetnikov.org> (Nikita Karetnikov's message of "Wed, 23 Jan 2013 01:13:12 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Nikita Karetnikov Cc: bug-guix@gnu.org Nikita Karetnikov skribis: >> I realize this is a bit more involved than =E2=80=9Cjust=E2=80=9D packag= ing 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'? =E2=80=98build-system=E2=80=99 objects are an abstraction over the underlyi= ng 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 =E2=80=98package-derivation=E2=80=99 procedure takes a package and retu= rn its derivation (see the manual.) To do that, it actually invokes the build procedure of the package=E2=80=99s build system. When it=E2=80=99s =E2=80= =98gnu-build-system=E2=80=99, the build procedure is =E2=80=98gnu-build=E2=80=99 from the (guix build-sys= tem gnu) package. In turn, this =E2=80=98gnu-build=E2=80=99 creates a build script that invok= es the build-side =E2=80=98gnu-build=E2=80=99=E2=80=93the one from (guix build gnu= -build-system). And from there, you see what happens. (See the manual about =E2=80=9Cstrata=E2= =80=9D.) 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 pac= kages) (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=E2=80=99d rather ask a Pythoner to check whether this = is still the recommended way. Ludo=E2=80=99.