From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Sassmannshausen Subject: Re: Making local development easy Date: Wed, 25 May 2016 10:23:20 +0200 Message-ID: <87h9dmtukn.fsf@gmail.com> References: <57449CA9.3040502@cbaines.net> Reply-To: alex.sassmannshausen@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5U6D-0003dP-MB for guix-devel@gnu.org; Wed, 25 May 2016 04:23:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5U68-0005e6-Jw for guix-devel@gnu.org; Wed, 25 May 2016 04:23:28 -0400 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:37199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5U68-0005e2-Cl for guix-devel@gnu.org; Wed, 25 May 2016 04:23:24 -0400 Received: by mail-wm0-x22b.google.com with SMTP id z87so52435471wmh.0 for ; Wed, 25 May 2016 01:23:24 -0700 (PDT) In-reply-to: <57449CA9.3040502@cbaines.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Christopher Baines Cc: guix-devel@gnu.org 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