From patchwork Sun Sep 22 11:09:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 15434 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 248D1173FA; Sun, 22 Sep 2019 12:10:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id C794D173C7 for ; Sun, 22 Sep 2019 12:10:12 +0100 (BST) Received: from localhost ([::1]:46104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBzkq-00063D-8K for patchwork@mira.cbaines.net; Sun, 22 Sep 2019 07:10:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48220) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBzkj-00062E-LM for guix-patches@gnu.org; Sun, 22 Sep 2019 07:10:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBzkh-0003tz-GI for guix-patches@gnu.org; Sun, 22 Sep 2019 07:10:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52842) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBzkg-0003sv-Dk for guix-patches@gnu.org; Sun, 22 Sep 2019 07:10:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iBzkg-000756-6b for guix-patches@gnu.org; Sun, 22 Sep 2019 07:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#37478] [PATCH] Support canonical guix environment -l guix.scm. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Sep 2019 11:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37478 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37478@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.156915055627156 (code B ref -1); Sun, 22 Sep 2019 11:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Sep 2019 11:09:16 +0000 Received: from localhost ([127.0.0.1]:33430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBzjq-00073n-OO for submit@debbugs.gnu.org; Sun, 22 Sep 2019 07:09:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:47355) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBzjo-00073d-Df for submit@debbugs.gnu.org; Sun, 22 Sep 2019 07:09:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48167) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBzjn-0005qf-3q for guix-patches@gnu.org; Sun, 22 Sep 2019 07:09:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iBzjm-0003Li-Vf; Sun, 22 Sep 2019 07:09:07 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=48136 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iBzjm-000627-2B; Sun, 22 Sep 2019 07:09:06 -0400 From: Jan Nieuwenhuizen Date: Sun, 22 Sep 2019 13:09:03 +0200 Message-ID: <871rw88u5s.fsf@gnu.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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 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 +;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen ;;; ;;; 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 . -(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))))