all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#37478] [PATCH] Support canonical guix environment -l guix.scm.
@ 2019-09-22 11:09 Jan Nieuwenhuizen
  2019-09-25 13:28 ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Nieuwenhuizen @ 2019-09-22 11:09 UTC (permalink / raw)
  To: 37478

Hi Guix,

I often find myself typing `guix environment -l guix.scm' in the Guix
source root and thought IWBN no make that "just work".  WYDT?

Greetings,
janneke

From 18f1ef75d38c8a40d2e1f8d56a041cd64bc5c64f Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Sun, 22 Sep 2019 13:01:38 +0200
Subject: [PATCH] Support canonical guix environment -l guix.scm.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Developers are encouraged to include a `guix.scm' in the root of their project
source to set-up a development environment (See 4.2 Invoking ‘guix package’),
so that

    guix environment -l guix.scm

provides a development environment.

* guix.scm: Return guix "git" package.
---
 guix.scm | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/guix.scm b/guix.scm
index 8753c21e42..919179e5cf 100644
--- a/guix.scm
+++ b/guix.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -16,7 +17,11 @@
 ;;; You should have received a copy of the GNU General Public License
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
-(define-module (guix))
+(define-module (guix)
+  #:use-module (guix git-download)
+  #:use-module (guix gexp)
+  #:use-module (guix packages)
+  #:use-module (gnu packages package-management))
 
 ;; The composite module that re-exports everything from the public modules.
 
@@ -39,3 +44,25 @@
                 (lambda (m)
                   (module-use! i (resolve-interface `(guix ,m)))))
               %public-modules)))
+
+;; To setup the development environment, run the following:
+;;
+;;    guix environment -l guix.scm
+;;    ./bootstrap && ./configure;
+;;
+;; To build the development snapshot, run:
+;;
+;;    guix build -f guix.scm
+;;
+;; To install the development snapshot, run:
+;;
+;;    guix package -f guix.scm
+;;
+(define %source-dir (dirname (current-filename)))
+
+(package
+  (inherit guix)
+  (version "git")
+  (source (local-file %source-dir
+                      #:recursive? #t
+                      #:select? (git-predicate %source-dir))))
-- 
2.23.0

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-12-10 21:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-22 11:09 [bug#37478] [PATCH] Support canonical guix environment -l guix.scm Jan Nieuwenhuizen
2019-09-25 13:28 ` Ludovic Courtès
2019-10-05  9:25   ` Jan Nieuwenhuizen
2019-12-10  4:52     ` Brett Gilio
2019-12-10 18:45       ` Thompson, David
2019-12-10 20:59         ` Jan Nieuwenhuizen

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.