guix-devel
[Top][All Lists]
Advanced

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

Re: Debugging Guix packages?


From: Ricardo Wurmus
Subject: Re: Debugging Guix packages?
Date: Tue, 19 Jan 2016 15:52:00 +0100

Jookia <address@hidden> writes:

> It'd be a nice feature to have where I could step through the build process in
> an environment close to the actual build and run build commands myself like
> 'patch' or 'make' or 'configure', but builders can also include Guile code.

We already have “guix environment --{pure,container} pkg” which spawns a
shell where all declared inputs are available and all environment
variables are set, but it does lack a method to run build phases.  It
would be very nice if we had a tool to selectively run build phases as
defined in the arguments field.

> Debugging the builder using Guile seems to be somewhat useful but I haven't
> figured out how to do that as I'm not versed in Guile and this may not be the
> right level of abstraction.

I have been packaging many applications for Guix and have only felt the
need for something more advanced than “guix environment” when building
really large stuff like the icedtea or GCC packages.  These packages
also have complicated build phases that patch the sources and set
additional environment variables, and it would have been helpful to have
a tool to run selected build phases in the current directory.

> I apologize if my thoughts aren't clear, currently it's annoying to have to
> decipher packages to hope I'm following along with the build. The alternative 
> is
> to iterate through full builds hoping I get the right output or manually 
> failing
> after a certain phase (I'm not sure how to do this.)

You can make packages fail by adding a failing build phase.  To fail
after “configure”, for example, you could do something like this:

    (arguments
      `(modify-phases %standard-phases
          (add-after 'configure 'bleh
            (const #f))))

~~ Ricardo



reply via email to

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