unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
To: Vagrant Cascadian <vagrant@debian.org>
Cc: 31956@debbugs.gnu.org
Subject: bug#31956: guix environment: add option to download and unpack source
Date: Sun, 24 Jun 2018 21:20:13 +0200	[thread overview]
Message-ID: <20180624212013.6afadf07@alma-ubu> (raw)
In-Reply-To: <87tvpsngwm.fsf@aikidev.net>

[-- Attachment #1: Type: text/plain, Size: 1820 bytes --]

On Sun, 24 Jun 2018 12:06:17 -0700
Vagrant Cascadian <vagrant@debian.org> wrote:

> I've a minor feature request.
> 
> When working on new package definitions, it's often useful to debug
> build failures with guix environment.
> 
> The current implementation, as I understand it, requires manually
> downloading the source, and merely drops you into whatever working
> directory you happen to be it.
> 
> It would be great if there were an option you could pass that
> downloads and unpacks the source somewhere and drops you into the
> newly unpacked source directory.
> 
> Not sure what to call it exactly, but something like:
> 
>   guix environment --with-source hello
> 
> Should drop you into an unpacked source directory with the inputs and
> such for building "hello".

Hi Vagrant,

if you need this in the case of build failures, use the "-K" option:

https://www.gnu.org/software/guix/manual/guix.html#Common-Build-Options

--keep-failed
-K

    Keep the build tree of failed builds. Thus, if a build fails, its
build tree is kept under /tmp, in a directory whose name is shown at
the end of the build log. This is useful when debugging build issues.
See Debugging Build Failures, for tips and tricks on how to debug build
issues.


See also

https://www.gnu.org/software/guix/manual/guix.html#Debugging-Build-Failures

For the case that the built went through OK, there is no such option.
You could raise an exception at the end of your package
definition/build phases.

Also there is the -S option to build:

guix build -S <package-name>

builds the source of your package. This will download the package,
verifies the checkum applies patches and applies snippets (i.e. rules
to remove for example binaries or other non-free-licensed parts).

Björn


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2018-06-24 19:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-24 19:06 bug#31956: guix environment: add option to download and unpack source Vagrant Cascadian
2018-06-24 19:20 ` Björn Höfling [this message]
2018-06-24 19:27 ` Danny Milosavljevic
2018-06-24 20:50   ` Jan Nieuwenhuizen

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=20180624212013.6afadf07@alma-ubu \
    --to=bjoern.hoefling@bjoernhoefling.de \
    --cc=31956@debbugs.gnu.org \
    --cc=vagrant@debian.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).