X-Loop: help-debbugs@HIDDEN Subject: [bug#37478] [PATCH] Support canonical guix environment -l guix.scm. Resent-From: Jan Nieuwenhuizen <janneke@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Sun, 22 Sep 2019 11:10:02 +0000 Resent-Message-ID: <handler.37478.B.156915055627156 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 37478 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37478 <at> debbugs.gnu.org X-Debbugs-Original-To: guix-patches@HIDDEN Received: via spool by submit <at> 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 <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1iBzjq-00073n-OO for submit <at> 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 <janneke@HIDDEN>) id 1iBzjo-00073d-Df for submit <at> 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 <janneke@HIDDEN>) id 1iBzjn-0005qf-3q for guix-patches@HIDDEN; Sun, 22 Sep 2019 07:09:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=ALL_TRUSTED,BAYES_05, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <janneke@HIDDEN>) 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 <janneke@HIDDEN>) id 1iBzjm-000627-2B; Sun, 22 Sep 2019 07:09:06 -0400 From: Jan Nieuwenhuizen <janneke@HIDDEN> Date: Sun, 22 Sep 2019 13:09:03 +0200 Message-ID: <871rw88u5s.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) 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@HIDDEN> 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=3DUTF-8 Content-Transfer-Encoding: 8bit Developers are encouraged to include a `guix.scm' in the root of their proj= ect source to set-up a development environment (See 4.2 Invoking =E2=80=98guix = package=E2=80=99), 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 =C2=A9 2012, 2014 Ludovic Court=C3=A8s <ludo@HIDDEN> +;;; Copyright =C2=A9 2019 Jan (janneke) Nieuwenhuizen <janneke@HIDDEN> ;;; ;;; 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/>. =20 -(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)) =20 ;; The composite module that re-exports everything from the public modules. =20 @@ -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)))) --=20 2.23.0 --=20 Jan Nieuwenhuizen <janneke@HIDDEN> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Jan Nieuwenhuizen <janneke@HIDDEN> Subject: bug#37478: Acknowledgement ([PATCH] Support canonical guix environment -l guix.scm.) Message-ID: <handler.37478.B.156915055627156.ack <at> debbugs.gnu.org> References: <871rw88u5s.fsf@HIDDEN> X-Gnu-PR-Message: ack 37478 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 37478 <at> debbugs.gnu.org Date: Sun, 22 Sep 2019 11:10:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): guix-patches@HIDDEN If you wish to submit further information on this problem, please send it to 37478 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 37478: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D37478 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: [bug#37478] [PATCH] Support canonical guix environment -l guix.scm. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Wed, 25 Sep 2019 13:57:02 +0000 Resent-Message-ID: <handler.37478.B37478.156941980818205 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 37478 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jan Nieuwenhuizen <janneke@HIDDEN> Cc: 37478 <at> debbugs.gnu.org Received: via spool by 37478-submit <at> debbugs.gnu.org id=B37478.156941980818205 (code B ref 37478); Wed, 25 Sep 2019 13:57:02 +0000 Received: (at 37478) by debbugs.gnu.org; 25 Sep 2019 13:56:48 +0000 Received: from localhost ([127.0.0.1]:42195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1iD7mi-0004jZ-29 for submit <at> debbugs.gnu.org; Wed, 25 Sep 2019 09:56:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1iD7me-0004jM-H5 for 37478 <at> debbugs.gnu.org; Wed, 25 Sep 2019 09:56:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1iD7L0-0002Mc-SJ; Wed, 25 Sep 2019 09:28:10 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54928 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1iD7Kx-0006ZD-KK; Wed, 25 Sep 2019 09:28:08 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> References: <871rw88u5s.fsf@HIDDEN> Date: Wed, 25 Sep 2019 15:28:06 +0200 In-Reply-To: <871rw88u5s.fsf@HIDDEN> (Jan Nieuwenhuizen's message of "Sun, 22 Sep 2019 13:09:03 +0200") Message-ID: <871rw4mro9.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hello, Jan Nieuwenhuizen <janneke@HIDDEN> skribis: > I often find myself typing `guix environment -l guix.scm' in the Guix > source root and thought IWBN no make that "just work". WYDT? IWBN, but=E2=80=A6 > -(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)) =E2=80=A6 the (guix) module is a public module, and it must not depend on anything but the (guix =E2=80=A6) modules it imports. So unfortunately we can=E2=80=99t just do that. Perhaps we could have a =E2=80=98.guix.scm=E2=80=99 file though, or =E2=80=98build-aux/guix.scm=E2=80=99, something like that? Thanks, Ludo=E2=80=99.
X-Loop: help-debbugs@HIDDEN Subject: [bug#37478] [PATCH] Support canonical guix environment -l guix.scm. Resent-From: Jan Nieuwenhuizen <janneke@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Sat, 05 Oct 2019 09:26:02 +0000 Resent-Message-ID: <handler.37478.B37478.157026751827476 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 37478 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Cc: 37478 <at> debbugs.gnu.org Received: via spool by 37478-submit <at> debbugs.gnu.org id=B37478.157026751827476 (code B ref 37478); Sat, 05 Oct 2019 09:26:02 +0000 Received: (at 37478) by debbugs.gnu.org; 5 Oct 2019 09:25:18 +0000 Received: from localhost ([127.0.0.1]:43757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1iGgJR-000796-NW for submit <at> debbugs.gnu.org; Sat, 05 Oct 2019 05:25:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <janneke@HIDDEN>) id 1iGgJP-00078l-VM for 37478 <at> debbugs.gnu.org; Sat, 05 Oct 2019 05:25:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <janneke@HIDDEN>) id 1iGgJJ-0005uC-Oi; Sat, 05 Oct 2019 05:25:10 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=53240 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <janneke@HIDDEN>) id 1iGgJI-0004j1-JX; Sat, 05 Oct 2019 05:25:09 -0400 From: Jan Nieuwenhuizen <janneke@HIDDEN> References: <871rw88u5s.fsf@HIDDEN> <871rw4mro9.fsf@HIDDEN> Date: Sat, 05 Oct 2019 11:25:06 +0200 In-Reply-To: <871rw4mro9.fsf@HIDDEN> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 25 Sep 2019 15:28:06 +0200") Message-ID: <87k19jy26l.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: >> I often find myself typing `guix environment -l guix.scm' in the Guix >> source root and thought IWBN no make that "just work". WYDT? > > IWBN, but=E2=80=A6 > >> -(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)) > > =E2=80=A6 the (guix) module is a public module, and it must not depend on > anything but the (guix =E2=80=A6) modules it imports. > > So unfortunately we can=E2=80=99t just do that. Hmm, and is there a difference between compile-time and run-time? I do not understand the rules well enough here... So I guess that something vaguely this (I really don't like the command-line "parsing" bit, just a thought experiment) --8<---------------cut here---------------start------------->8--- ;; Naive command-line parser: are we running from Guix source tree ;; guix build -f guix.scm ;; guix environment -l guix.scm ;; then return guix@git package (when (and (file-exists? "guix/gexp.scm") (let ((len (length (command-line)))) (and (> len 3) (let ((tail (list-tail (command-line) (- len 3)))) (or (equal? tail '("build" "-f" "guix.scm")) (equal? tail '("environment" "-l" "guix.scm"))))))) (let ((source-dir (dirname (current-filename)))) ((@ (guix packages) package) (inherit (@ (gnu packages package-management) guix)) (version "git") (source ((@ (guix gexp) local-file) source-dir #:recursive? #t #:select? ((@ (guix git-download) git-predicate) source-dir))= )))) --8<---------------cut here---------------end--------------->8--- is also not possible? It is also starts to look like a kludge and hard to get right...bah :) > Perhaps we could have a =E2=80=98.guix.scm=E2=80=99 file though, or > =E2=80=98build-aux/guix.scm=E2=80=99, something like that? Yes...I was hoping that we could offer/advise something standardized that all guix'ified upstreams could/would use. I think that I've seen `.guix.scm', but also a `guix.scm' that returns a manifest, so usage would be `guix environment -m guix.scm', and no way to build the package itself from git. Once Guix is blessed `the GNU System' (any day now ;-) we need to have a a thought-through proposal to amend standards.texi anyway. Greetings, janneke --=20 Jan Nieuwenhuizen <janneke@HIDDEN> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.