all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Sassmannshausen <alex.sassmannshausen@gmail.com>
To: Christopher Baines <mail@cbaines.net>
Cc: guix-devel@gnu.org
Subject: Re: Making local development easy
Date: Wed, 25 May 2016 10:23:20 +0200	[thread overview]
Message-ID: <87h9dmtukn.fsf@gmail.com> (raw)
In-Reply-To: <57449CA9.3040502@cbaines.net>

Hello,

Christopher Baines writes:

> Today I had a go at writing a dummy python library, and packaging it,
> and then installing it within an environment, with the aim of
> experimenting more with how Guix works, and to explore how Guix can be
> used as a developer (with unpublished local packages).
>
> There were several slight issues with this, but I got some help on IRC
> to work around these.

I've definitely gone down the same route of wanting to use Guix in local
development.  At the moment I'm using
  guix environment -l project-guix.scm
to spawn a shell with the full working environment for my project — this
is awesome, but I think it's slightly orthogenal to what you describe.

> The first, is that the hash is required, which I only had to compute
> once, but if I wanted to change the package, I would have to update
> this, which is prohibitive to local development. As an improvement to
> this, could the hash be optional, and if it does not exist, be
> calculated when the build is performed?

From my perspective, I think silently calculating a hash on the fly if
it is not provided would be problematic: it might lead to laziness in
completing the hash, which would undermine the security model of Guix
(if I understand correctly).

But maybe an explicit flag setting the declaration to "dev-mode", might
be useful?

> The second issue was getting the data to the store, as first I tried a
> relative path, but that did not work, and ended up having to expose the
> repository using a HTTP server, and access it over the loopback
> interface. This again is rather prohibitive to local development. To
> improve on this, could guix build do the insertion in to the store, such
> that relative paths would work? This would allow just writing a
> "guix.scm" file, which just uses (git-reference (url "./") (commit "HEAD")).

This, I think, would be great.  Specifically, accepting a "file:///"
protocol for (uri)/(git-reference (url)) would be pretty useful…

My 2¢…

Alex

  reply	other threads:[~2016-05-25  8:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 18:25 Making local development easy Christopher Baines
2016-05-25  8:23 ` Alex Sassmannshausen [this message]
2016-05-25 15:48   ` Christopher Baines
2016-05-25 16:13   ` Leo Famulari
2016-05-25  9:29 ` Ricardo Wurmus
2016-05-25  9:34   ` Alex Sassmannshausen
2016-05-25 16:04   ` Christopher Baines
2016-05-25 18:33     ` Ricardo Wurmus
2016-05-26  8:07       ` Ludovic Courtès
2016-05-26 12:05         ` Thompson, David
2016-06-21  8:43           ` Ludovic Courtès
2016-05-25  9:36 ` Andy Wingo

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h9dmtukn.fsf@gmail.com \
    --to=alex.sassmannshausen@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=mail@cbaines.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.