GNU bug report logs - #65439
[PATCH] maint: Support `guix shell' in Guix's git archive with

Previous Next

Package: guix-patches;

Reported by: Janneke Nieuwenhuizen <janneke <at> gnu.org>

Date: Mon, 21 Aug 2023 19:30:02 UTC

Severity: normal

Tags: patch

Done: Janneke Nieuwenhuizen <janneke <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 65439 in the body.
You can then email your comments to 65439 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#65439; Package guix-patches. (Mon, 21 Aug 2023 19:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Janneke Nieuwenhuizen <janneke <at> gnu.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 21 Aug 2023 19:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Janneke Nieuwenhuizen <janneke <at> gnu.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] maint: Support `guix shell' in Guix's git archive with
Date: Mon, 21 Aug 2023 21:29:15 +0200
[Message part 1 (text/plain, inline)]
Hi!

A couple of months ago I stumbled upon this awesome-looking guide
<https://rednosehacker.com/combo-guix-shell-emacs-envrc-el> and today I
finally found the time to setup direnv and emacs-envrc with Guix for my
development projects.  Really should have done this sooner, it's a huge
step-up from M-x guix-set-emacs-environment (or in avoiding to do that
run make in the shell and lookup line numbers manually -- why does ffap
not respect GNU-style error messages, btw?).

Most everything worked...except for Guix; as Guix git does not support
`guix shell' ootb; you really need your own local hack or have to type
something like "guix shell -D guix".

In the attached patch I share my local hack `maintenance.scm', which
allows this generalized .envrc

--8<---------------cut here---------------start------------->8---
eval $(guix shell --search-paths)
if test -d doc; then
   export INFOPATH="$PWD/doc${INFOPATH:+:}$INFOPATH"
fi
if test -f pre-inst-env; then
    source pre-inst-env ""
else
    export GUILE_LOAD_PATH="$PWD${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH"
    export GUILE_LOAD_COMPILED_PATH="$PWD${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"
fi
--8<---------------cut here---------------end--------------->8---

to also work for Guix.

Greetings,
Janneke

[0001-maint-Support-guix-shell-in-Guix-s-git-archive-with-.patch (text/x-patch, inline)]
From 84bb463a70bacf93e74fe6c0f14932149acd5383 Mon Sep 17 00:00:00 2001
Message-ID: <84bb463a70bacf93e74fe6c0f14932149acd5383.1692646073.git.janneke <at> gnu.org>
From: Janneke Nieuwenhuizen <janneke <at> gnu.org>
Date: Mon, 21 Aug 2023 20:57:12 +0200
Subject: [PATCH] maint: Support `guix shell' in Guix's git archive with
 manifest.scm.

* manifest.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
---
 Makefile.am  |  1 +
 manifest.scm | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 manifest.scm

diff --git a/Makefile.am b/Makefile.am
index 738532f839..1237968ddd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -692,6 +692,7 @@ EXTRA_DIST +=						\
   ROADMAP						\
   TODO							\
   bootstrap						\
+  manifest.scm						\
   build-aux/build-self.scm				\
   build-aux/check-channel-news.scm			\
   build-aux/check-final-inputs-self-contained.scm	\
diff --git a/manifest.scm b/manifest.scm
new file mode 100644
index 0000000000..14473443ed
--- /dev/null
+++ b/manifest.scm
@@ -0,0 +1,32 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Janneke Nieuwenhuizen <janneke <at> gnu.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+;; GNU Guix development manifest.  To create development environment, run
+;;
+;;     guix shell
+;;
+;; or something like
+;;
+;;     guix shell --pure git git:send-email openssh
+
+(use-modules (srfi srfi-1)
+             (guix packages)
+             (guix profiles)
+             (gnu packages package-management))
+
+(package->development-manifest guix)

base-commit: 4c7627dfec88350f9a1705e9527c38dd41506f8b
-- 
2.41.0

[Message part 3 (text/plain, inline)]
-- 
Janneke Nieuwenhuizen <janneke <at> gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com

Information forwarded to guix-patches <at> gnu.org:
bug#65439; Package guix-patches. (Wed, 06 Sep 2023 07:14:01 GMT) Full text and rfc822 format available.

Message #8 received at 65439 <at> debbugs.gnu.org (full text, mbox):

From: Janneke Nieuwenhuizen <janneke <at> gnu.org>
To: 65439 <at> debbugs.gnu.org
Subject: [PATCH v2] WAS [bug#65439] [PATCH] maint: Support `guix shell' in
 Guix's git archive with
Date: Wed, 06 Sep 2023 09:13:30 +0200
[Message part 1 (text/plain, inline)]
Janneke Nieuwenhuizen writes:

Hi!

> In the attached patch I share my local hack `maintenance.scm', which
> allows this generalized .envrc

For v2 I removed unnecessary includes.  (Initially `maintenance.scm' was
a bit more interesting.)  Also mention using it implicitly in
Contributing.texi.

[snip .envrc exapmle that runs ./pre-inst-env]

...and while I'm here; I'm using this much simpler .envrc now:

--8<---------------cut here---------------start------------->8---
eval $(guix shell --search-paths)
if test -f doc/dir; then
   export INFOPATH="$PWD/doc${INFOPATH:+:}$INFOPATH"
fi
--8<---------------cut here---------------end--------------->8---

I found that it's better to simply use ./pre-inst-env in the M-x compile
command instead.

Greetings,
Janneke

[v2-0001-maint-Support-guix-shell-in-Guix-s-git-archive-wi.patch (text/x-patch, inline)]
From 7f36f48a4757fc2952b8140b72f1952688d0ac6b Mon Sep 17 00:00:00 2001
Message-ID: <7f36f48a4757fc2952b8140b72f1952688d0ac6b.1693984077.git.janneke <at> gnu.org>
From: Janneke Nieuwenhuizen <janneke <at> gnu.org>
Date: Mon, 21 Aug 2023 20:57:12 +0200
Subject: [PATCH v2] maint: Support `guix shell' in Guix's git archive with
 manifest.scm.

* manifest.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
* doc/contributing.texi (Building from Git): Mention using it.
---
 Makefile.am           |  1 +
 doc/contributing.texi |  6 ++++++
 manifest.scm          | 30 ++++++++++++++++++++++++++++++
 3 files changed, 37 insertions(+)
 create mode 100644 manifest.scm

diff --git a/Makefile.am b/Makefile.am
index 922913355c..8924974e8a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -692,6 +692,7 @@ EXTRA_DIST +=						\
   ROADMAP						\
   TODO							\
   bootstrap						\
+  manifest.scm						\
   build-aux/build-self.scm				\
   build-aux/check-channel-news.scm			\
   build-aux/check-final-inputs-self-contained.scm	\
diff --git a/doc/contributing.texi b/doc/contributing.texi
index fa9238fde8..2ee1e4aa2c 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -77,6 +77,12 @@ Building from Git
 guix shell -D guix --pure
 @end example
 
+or even, from within a Git worktree for Guix
+
+@example
+guix shell --pure
+@end example
+
 @xref{Invoking guix shell}, for more information on that command.
 
 If you are unable to use Guix when building Guix from a checkout, the
diff --git a/manifest.scm b/manifest.scm
new file mode 100644
index 0000000000..bcd94b68c5
--- /dev/null
+++ b/manifest.scm
@@ -0,0 +1,30 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Janneke Nieuwenhuizen <janneke <at> gnu.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+;; GNU Guix development manifest.  To create development environment, run
+;;
+;;     guix shell
+;;
+;; or something like
+;;
+;;     guix shell --pure git git:send-email openssh
+
+(use-modules (guix profiles)
+             (gnu packages package-management))
+
+(package->development-manifest guix)

base-commit: 6113e0529d61df7425f64e30a6bf77f7cfdfe5a5
-- 
2.41.0

[Message part 3 (text/plain, inline)]
-- 
Janneke Nieuwenhuizen <janneke <at> gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com

Information forwarded to guix-patches <at> gnu.org:
bug#65439; Package guix-patches. (Mon, 18 Sep 2023 08:49:01 GMT) Full text and rfc822 format available.

Message #11 received at 65439 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Janneke Nieuwenhuizen <janneke <at> gnu.org>
Cc: 65439 <at> debbugs.gnu.org
Subject: Re: bug#65439: [PATCH] maint: Support `guix shell' in Guix's git
 archive with
Date: Mon, 18 Sep 2023 10:47:33 +0200
Hi,

Janneke Nieuwenhuizen <janneke <at> gnu.org> skribis:

>>From 7f36f48a4757fc2952b8140b72f1952688d0ac6b Mon Sep 17 00:00:00 2001
> Message-ID: <7f36f48a4757fc2952b8140b72f1952688d0ac6b.1693984077.git.janneke <at> gnu.org>
> From: Janneke Nieuwenhuizen <janneke <at> gnu.org>
> Date: Mon, 21 Aug 2023 20:57:12 +0200
> Subject: [PATCH v2] maint: Support `guix shell' in Guix's git archive with
>  manifest.scm.
>
> * manifest.scm: New file.
> * Makefile.am (EXTRA_DIST): Add it.
> * doc/contributing.texi (Building from Git): Mention using it.

Looks great to me!

> +++ b/doc/contributing.texi
> @@ -77,6 +77,12 @@ Building from Git
>  guix shell -D guix --pure
>  @end example
>  
> +or even, from within a Git worktree for Guix

I’d add a colon at the end of the line.  :-)

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#65439; Package guix-patches. (Mon, 18 Sep 2023 08:49:02 GMT) Full text and rfc822 format available.

Message #14 received at 65439 <at> debbugs.gnu.org (full text, mbox):

From: Janneke Nieuwenhuizen <janneke <at> gnu.org>
To: 65439 <at> debbugs.gnu.org
Subject: Re: [PATCH v2] WAS [bug#65439] [PATCH] maint: Support `guix shell'
 in Guix's git archive with
Date: Mon, 18 Sep 2023 10:47:44 +0200
Janneke Nieuwenhuizen writes:

Hi!

> Janneke Nieuwenhuizen writes:
>
>> In the attached patch I share my local hack `maintenance.scm', which
>> allows this generalized .envrc
>
> For v2 I removed unnecessary includes.  (Initially `maintenance.scm' was
> a bit more interesting.)  Also mention using it implicitly in
> Contributing.texi.
>
> [snip .envrc exapmle that runs ./pre-inst-env]
>
> ...and while I'm here; I'm using this much simpler .envrc now:
>
> eval $(guix shell --search-paths)
> if test -f doc/dir; then
>    export INFOPATH="$PWD/doc${INFOPATH:+:}$INFOPATH"
> fi
>
> I found that it's better to simply use ./pre-inst-env in the M-x compile
> command instead.

It's been four weeks without comment, unless there are any objections
I'll push at the end of the day.

Greetings,
Janneke

-- 
Janneke Nieuwenhuizen <janneke <at> gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com




Reply sent to Janneke Nieuwenhuizen <janneke <at> gnu.org>:
You have taken responsibility. (Mon, 18 Sep 2023 20:16:02 GMT) Full text and rfc822 format available.

Notification sent to Janneke Nieuwenhuizen <janneke <at> gnu.org>:
bug acknowledged by developer. (Mon, 18 Sep 2023 20:16:02 GMT) Full text and rfc822 format available.

Message #19 received at 65439-done <at> debbugs.gnu.org (full text, mbox):

From: Janneke Nieuwenhuizen <janneke <at> gnu.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 65439-done <at> debbugs.gnu.org
Subject: Re: bug#65439: [PATCH] maint: Support `guix shell' in Guix's git
 archive with
Date: Mon, 18 Sep 2023 22:14:52 +0200
Ludovic Courtès writes:

Hi,

> Janneke Nieuwenhuizen <janneke <at> gnu.org> skribis:
>
>>>From 7f36f48a4757fc2952b8140b72f1952688d0ac6b Mon Sep 17 00:00:00 2001
>> Message-ID: <7f36f48a4757fc2952b8140b72f1952688d0ac6b.1693984077.git.janneke <at> gnu.org>
>> From: Janneke Nieuwenhuizen <janneke <at> gnu.org>
>> Date: Mon, 21 Aug 2023 20:57:12 +0200
>> Subject: [PATCH v2] maint: Support `guix shell' in Guix's git archive with
>>  manifest.scm.
>>
>> * manifest.scm: New file.
>> * Makefile.am (EXTRA_DIST): Add it.
>> * doc/contributing.texi (Building from Git): Mention using it.
>
> Looks great to me!

Thanks :)

>> +++ b/doc/contributing.texi
>> @@ -77,6 +77,12 @@ Building from Git
>>  guix shell -D guix --pure
>>  @end example
>>  
>> +or even, from within a Git worktree for Guix
>
> I’d add a colon at the end of the line.  :-)

Ah, done.  Pushed to master as 7bf12820f61179900f9d1f753acf91fd33724976

Greetings,
Janneke

-- 
Janneke Nieuwenhuizen <janneke <at> gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 17 Oct 2023 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 206 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.