unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
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:27:27 +0200	[thread overview]
Message-ID: <20180624212727.0adf311c@scratchpost.org> (raw)
In-Reply-To: <87tvpsngwm.fsf@aikidev.net>

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

Hi Vagrant,

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

> 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

+1

Right now, my silly workaround is to add a phase which fails

  (add-after 'unpack 'fail
    (lambda _
      (error "stop it")))

and then do

  guix build --keep-failed hello

and then do

  guix environment --pure hello
  cd /tmp/guix-build-hello*

That's... very manual.

Also, if the directory in /tmp is not .drv-0, the environment is technically not the same as it was inside the guix-daemon build container.

In that case there'd be an extra step

  rm -rf /tmp/guix-build-hello-*.drv-0
  ln -s /tmp/guix-build-hello-* /tmp/guix-build-hello-<...>.drv-0
  cd /tmp/guix-build-hello-<...>.drv-0

All in all that's not simple.

Also, guix-daemon is taken from Nix and thus not exactly the same as
guix environment in some cases.

That's why in some cases I have to (edit the package definition and
invoke guix build) over and over again in order to find a problem.

In the long term we'll replace guix-daemon by guix environment.
Much easier to reproduce situations then.

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

  parent reply	other threads:[~2018-06-24 19:28 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
2018-06-24 19:27 ` Danny Milosavljevic [this message]
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=20180624212727.0adf311c@scratchpost.org \
    --to=dannym@scratchpost.org \
    --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).