* [PATCH] gnu: Make "guix-devel" a public variable in package-management.scm
@ 2016-10-02 21:42 Chris Marusich
2016-10-05 21:35 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Chris Marusich @ 2016-10-02 21:42 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1.1: Type: text/plain, Size: 512 bytes --]
Hi,
Here's a patch to address the following issue ('guix environment guix
doesn't provide guix dependencies'):
https://lists.gnu.org/archive/html/guix-devel/2016-09/msg02118.html
I signed the commit with my GPG key, but it seems that 'git
format-patch' doesn't include the signature. If you know how to make it
include the signature, please let me know!
I verified that the new package builds. Notably, it did not build on my
GuixSD machine until I shortened the version string.
--
Chris
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Make-guix-devel-a-public-variable-in-package-man.patch --]
[-- Type: text/x-patch, Size: 4461 bytes --]
From 3fa2bc4f0d11fc695bfab9b85981228c1a88e007 Mon Sep 17 00:00:00 2001
From: Chris Marusich <cmmarusich@gmail.com>
Date: Sun, 2 Oct 2016 13:00:34 -0700
Subject: [PATCH] gnu: Make "guix-devel" a public variable in
package-management.scm
This provides an obvious and easy way to use Guix to set up an environment for
building Guix from a Git checkout.
* gnu/packages/package-management.scm (guix-devel): Make it public and give it
an appropriate name, synopsis, and description. Change the generated
version string to be even shorter so that the tests can actually run.
Update all documentation to refer to "guix" when talking about the release
version, and "guix-devel" when talking about the development version.
---
README | 3 ++-
doc/contributing.texi | 4 ++--
doc/guix.texi | 2 +-
gnu/packages/package-management.scm | 16 +++++++++++++---
4 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/README b/README
index f05a4b5..d4484e8 100644
--- a/README
+++ b/README
@@ -54,7 +54,8 @@ For information on installation from a Git checkout, please see the section
You can re-build and re-install Guix using a system that already runs Guix.
To do so:
- - Start a shell with the development environment for Guix:
+ - Start a shell with an environment containing the dependencies required to
+ build the release version of Guix:
guix environment guix
diff --git a/doc/contributing.texi b/doc/contributing.texi
index 18d891d..50657de 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -50,14 +50,14 @@ all the dependencies and appropriate environment variables are set up to
hack on Guix:
@example
-guix environment guix
+guix environment guix-devel
@end example
@xref{Invoking guix environment}, for more information on that command.
Extra dependencies can be added with @option{--ad-hoc}:
@example
-guix environment guix --ad-hoc help2man git strace
+guix environment guix-devel --ad-hoc git strace
@end example
Run @command{./bootstrap} to generate the build system infrastructure
diff --git a/doc/guix.texi b/doc/guix.texi
index f5bbb92..e03b4a4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5609,7 +5609,7 @@ the following command creates a Guix development environment that
additionally includes Git and strace:
@example
-guix environment guix --ad-hoc git strace
+guix environment guix-devel --ad-hoc git strace
@end example
Sometimes it is desirable to isolate the environment as much as
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 4cc5b89..c1f1095 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -207,14 +207,15 @@ the Nix package manager.")
(license gpl3+)
(properties '((ftp-server . "alpha.gnu.org")))))
-(define guix-devel
+(define-public guix-devel
;; Development version of Guix.
;;
;; Note: use a very short commit id; with a longer one, the limit on
;; hash-bang lines would be exceeded while running the tests.
(let ((commit "4420940f20a2f36f29519f686bca7b85be6be5c9"))
(package (inherit guix-0.11.0)
- (version (string-append "0.11.0-1." (string-take commit 4)))
+ (name "guix-devel")
+ (version (string-take commit 8))
(source (origin
(method git-fetch)
(uri (git-reference
@@ -251,7 +252,16 @@ the Nix package manager.")
("texinfo" ,texinfo)
("graphviz" ,graphviz)
("help2man" ,help2man)
- ,@(package-native-inputs guix-0.11.0))))))
+ ,@(package-native-inputs guix-0.11.0)))
+ (synopsis "Development version of GNU Guix")
+ (description "GNU Guix is a functional package manager for the GNU
+system, and is also a distribution thereof. It includes a virtual machine
+image. Besides the usual package management features, it also supports
+transactional upgrades and roll-backs, per-user profiles, and much more. It
+is based on the Nix package manager. This is a development version which is
+built from a recent commit in the project's Git repository. It provides
+additional dependencies that are not normally required for building the
+release version, such as GNU Autoconf."))))
(define-public guix guix-devel)
--
2.9.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: Make "guix-devel" a public variable in package-management.scm
2016-10-02 21:42 [PATCH] gnu: Make "guix-devel" a public variable in package-management.scm Chris Marusich
@ 2016-10-05 21:35 ` Ludovic Courtès
2016-10-09 4:14 ` Chris Marusich
0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2016-10-05 21:35 UTC (permalink / raw)
To: Chris Marusich; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 3105 bytes --]
Hi,
Chris Marusich <cmmarusich@gmail.com> skribis:
> Here's a patch to address the following issue ('guix environment guix
> doesn't provide guix dependencies'):
>
> https://lists.gnu.org/archive/html/guix-devel/2016-09/msg02118.html
Thanks for looking into it!
> I signed the commit with my GPG key, but it seems that 'git
> format-patch' doesn't include the signature. If you know how to make it
> include the signature, please let me know!
I think it can’t do that. So in practice whoever pushes signs on your
behalf.
> From 3fa2bc4f0d11fc695bfab9b85981228c1a88e007 Mon Sep 17 00:00:00 2001
> From: Chris Marusich <cmmarusich@gmail.com>
> Date: Sun, 2 Oct 2016 13:00:34 -0700
> Subject: [PATCH] gnu: Make "guix-devel" a public variable in
> package-management.scm
>
> This provides an obvious and easy way to use Guix to set up an environment for
> building Guix from a Git checkout.
>
> * gnu/packages/package-management.scm (guix-devel): Make it public and give it
> an appropriate name, synopsis, and description. Change the generated
> version string to be even shorter so that the tests can actually run.
> Update all documentation to refer to "guix" when talking about the release
> version, and "guix-devel" when talking about the development version.
[...]
> -(define guix-devel
> +(define-public guix-devel
> ;; Development version of Guix.
> ;;
> ;; Note: use a very short commit id; with a longer one, the limit on
> ;; hash-bang lines would be exceeded while running the tests.
> (let ((commit "4420940f20a2f36f29519f686bca7b85be6be5c9"))
> (package (inherit guix-0.11.0)
> - (version (string-append "0.11.0-1." (string-take commit 4)))
> + (name "guix-devel")
> + (version (string-take commit 8))
> (source (origin
> (method git-fetch)
> (uri (git-reference
> @@ -251,7 +252,16 @@ the Nix package manager.")
> ("texinfo" ,texinfo)
> ("graphviz" ,graphviz)
> ("help2man" ,help2man)
> - ,@(package-native-inputs guix-0.11.0))))))
> + ,@(package-native-inputs guix-0.11.0)))
> + (synopsis "Development version of GNU Guix")
> + (description "GNU Guix is a functional package manager for the GNU
> +system, and is also a distribution thereof. It includes a virtual machine
> +image. Besides the usual package management features, it also supports
> +transactional upgrades and roll-backs, per-user profiles, and much more. It
> +is based on the Nix package manager. This is a development version which is
> +built from a recent commit in the project's Git repository. It provides
> +additional dependencies that are not normally required for building the
> +release version, such as GNU Autoconf."))))
>
> (define-public guix guix-devel)
There’s the problem that the ‘guix-devel’ variable above is also the
Guix package that we currently use, and thus it should be called “guix”,
not “guix-devel”.
So what about something along these lines:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 939 bytes --]
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 70a6a49..8a77c40 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -255,6 +255,18 @@ the Nix package manager.")
(define-public guix guix-devel)
+(define-public guix-for-environment
+ ;; We provide this pseudo-package just to allow people to run:
+ ;; guix environment guix-devel
+ ;; to reliably get the development environment for Guix (using 'guix' for
+ ;; this purpose does not work when 'guix' points to the built-from-tarball
+ ;; package rather than to the built-from-checkout package.)
+ (package
+ (inherit guix-devel)
+ (name "guix-devel")
+ (source #f) ;not meant to be built
+ (supported-systems '())))
+
(define (source-file? file stat)
"Return true if FILE is likely a source file, false if it is a typical
generated file."
[-- Attachment #3: Type: text/plain, Size: 284 bytes --]
?
If that’s fine with you, could you incorporate it in your patch?
Minor comment: it’s useful to provide a specialized synopsis like you
did, but I think it’s better to leave the description unchanged rather
than duplicate it almost identical.
Thanks!
Ludo’.
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: Make "guix-devel" a public variable in package-management.scm
2016-10-05 21:35 ` Ludovic Courtès
@ 2016-10-09 4:14 ` Chris Marusich
2016-10-18 14:24 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Chris Marusich @ 2016-10-09 4:14 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
[-- Attachment #1.1: Type: text/plain, Size: 5216 bytes --]
Hi,
ludo@gnu.org (Ludovic Courtès) writes:
> Hi,
>
> Chris Marusich <cmmarusich@gmail.com> skribis:
>
>> Here's a patch to address the following issue ('guix environment guix
>> doesn't provide guix dependencies'):
>>
>> https://lists.gnu.org/archive/html/guix-devel/2016-09/msg02118.html
>
> Thanks for looking into it!
>
>> I signed the commit with my GPG key, but it seems that 'git
>> format-patch' doesn't include the signature. If you know how to make it
>> include the signature, please let me know!
>
> I think it can’t do that. So in practice whoever pushes signs on your
> behalf.
OK. That's what I suspected!
>> From 3fa2bc4f0d11fc695bfab9b85981228c1a88e007 Mon Sep 17 00:00:00 2001
>> From: Chris Marusich <cmmarusich@gmail.com>
>> Date: Sun, 2 Oct 2016 13:00:34 -0700
>> Subject: [PATCH] gnu: Make "guix-devel" a public variable in
>> package-management.scm
>>
>> This provides an obvious and easy way to use Guix to set up an environment for
>> building Guix from a Git checkout.
>>
>> * gnu/packages/package-management.scm (guix-devel): Make it public and give it
>> an appropriate name, synopsis, and description. Change the generated
>> version string to be even shorter so that the tests can actually run.
>> Update all documentation to refer to "guix" when talking about the release
>> version, and "guix-devel" when talking about the development version.
>
> [...]
>
>> -(define guix-devel
>> +(define-public guix-devel
>> ;; Development version of Guix.
>> ;;
>> ;; Note: use a very short commit id; with a longer one, the limit on
>> ;; hash-bang lines would be exceeded while running the tests.
>> (let ((commit "4420940f20a2f36f29519f686bca7b85be6be5c9"))
>> (package (inherit guix-0.11.0)
>> - (version (string-append "0.11.0-1." (string-take commit 4)))
>> + (name "guix-devel")
>> + (version (string-take commit 8))
>> (source (origin
>> (method git-fetch)
>> (uri (git-reference
>> @@ -251,7 +252,16 @@ the Nix package manager.")
>> ("texinfo" ,texinfo)
>> ("graphviz" ,graphviz)
>> ("help2man" ,help2man)
>> - ,@(package-native-inputs guix-0.11.0))))))
>> + ,@(package-native-inputs guix-0.11.0)))
>> + (synopsis "Development version of GNU Guix")
>> + (description "GNU Guix is a functional package manager for the GNU
>> +system, and is also a distribution thereof. It includes a virtual machine
>> +image. Besides the usual package management features, it also supports
>> +transactional upgrades and roll-backs, per-user profiles, and much more. It
>> +is based on the Nix package manager. This is a development version which is
>> +built from a recent commit in the project's Git repository. It provides
>> +additional dependencies that are not normally required for building the
>> +release version, such as GNU Autoconf."))))
>>
>> (define-public guix guix-devel)
>
> There’s the problem that the ‘guix-devel’ variable above is also the
> Guix package that we currently use, and thus it should be called “guix”,
> not “guix-devel”.
>
> So what about something along these lines:
>
>
> diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
> index 70a6a49..8a77c40 100644
> --- a/gnu/packages/package-management.scm
> +++ b/gnu/packages/package-management.scm
> @@ -255,6 +255,18 @@ the Nix package manager.")
>
> (define-public guix guix-devel)
>
> +(define-public guix-for-environment
> + ;; We provide this pseudo-package just to allow people to run:
> + ;; guix environment guix-devel
> + ;; to reliably get the development environment for Guix (using 'guix' for
> + ;; this purpose does not work when 'guix' points to the built-from-tarball
> + ;; package rather than to the built-from-checkout package.)
> + (package
> + (inherit guix-devel)
> + (name "guix-devel")
> + (source #f) ;not meant to be built
> + (supported-systems '())))
> +
> (define (source-file? file stat)
> "Return true if FILE is likely a source file, false if it is a typical
> generated file."
>
>
> ?
>
> If that’s fine with you, could you incorporate it in your patch?
Sounds good to me. I've attached the updated patch to this email and
mentioned you as co-author. The new package fails to build with a
cryptic error, but since it isn't meant to be built, that seems OK.
What is the purpose of temporarily changing the "guix" variable to refer
to the release package (as in commit 4420940f)? Because it usually
refers to the development version, wouldn't it be better to make the
"guix" variable ALWAYS refer to the development version? It isn't clear
to me why we need to temporarily change this variable to refer to the
release version.
> Minor comment: it’s useful to provide a specialized synopsis like you
> did, but I think it’s better to leave the description unchanged rather
> than duplicate it almost identical.
That's fine with me, too. Thank you for your review!
--
Chris
[-- Attachment #1.2: 0001-gnu-Add-guix-for-environment-variable.patch --]
[-- Type: text/x-patch, Size: 3590 bytes --]
From c58273cd40a645f58fa4397049656095fae9c3fc Mon Sep 17 00:00:00 2001
From: Chris Marusich <cmmarusich@gmail.com>
Date: Sun, 2 Oct 2016 13:00:34 -0700
Subject: [PATCH] gnu: Add "guix-for-environment" variable
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This provides an obvious and easy way to use Guix to set up an environment for
building Guix from a Git checkout.
* gnu/packages/package-management.scm (guix-for-environment): Add it. Update
all documentation to refer to the package named "guix" when talking about
the release version, and the package named "guix-devel" when talking about
the development version.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
---
README | 3 ++-
doc/contributing.texi | 4 ++--
doc/guix.texi | 2 +-
gnu/packages/package-management.scm | 12 ++++++++++++
4 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/README b/README
index f05a4b5..d4484e8 100644
--- a/README
+++ b/README
@@ -54,7 +54,8 @@ For information on installation from a Git checkout, please see the section
You can re-build and re-install Guix using a system that already runs Guix.
To do so:
- - Start a shell with the development environment for Guix:
+ - Start a shell with an environment containing the dependencies required to
+ build the release version of Guix:
guix environment guix
diff --git a/doc/contributing.texi b/doc/contributing.texi
index 18d891d..50657de 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -50,14 +50,14 @@ all the dependencies and appropriate environment variables are set up to
hack on Guix:
@example
-guix environment guix
+guix environment guix-devel
@end example
@xref{Invoking guix environment}, for more information on that command.
Extra dependencies can be added with @option{--ad-hoc}:
@example
-guix environment guix --ad-hoc help2man git strace
+guix environment guix-devel --ad-hoc git strace
@end example
Run @command{./bootstrap} to generate the build system infrastructure
diff --git a/doc/guix.texi b/doc/guix.texi
index f5bbb92..e03b4a4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5609,7 +5609,7 @@ the following command creates a Guix development environment that
additionally includes Git and strace:
@example
-guix environment guix --ad-hoc git strace
+guix environment guix-devel --ad-hoc git strace
@end example
Sometimes it is desirable to isolate the environment as much as
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 4cc5b89..01221df 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -255,6 +255,18 @@ the Nix package manager.")
(define-public guix guix-devel)
+(define-public guix-for-environment
+ ;; We provide this pseudo-package just to allow people to run:
+ ;; guix environment guix-devel
+ ;; to reliably get the development environment for Guix (using 'guix' for
+ ;; this purpose does not work when 'guix' points to the built-from-tarball
+ ;; package rather than to the built-from-checkout package.)
+ (package
+ (inherit guix-devel)
+ (name "guix-devel")
+ (source #f) ;not meant to be built
+ (supported-systems '())))
+
(define (source-file? file stat)
"Return true if FILE is likely a source file, false if it is a typical
generated file."
--
2.9.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: Make "guix-devel" a public variable in package-management.scm
2016-10-09 4:14 ` Chris Marusich
@ 2016-10-18 14:24 ` Ludovic Courtès
2016-10-30 22:21 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2016-10-18 14:24 UTC (permalink / raw)
To: Chris Marusich; +Cc: guix-devel
Hi Chris,
Chris Marusich <cmmarusich@gmail.com> skribis:
> ludo@gnu.org (Ludovic Courtès) writes:
[...]
>> (define-public guix guix-devel)
>>
>> +(define-public guix-for-environment
>> + ;; We provide this pseudo-package just to allow people to run:
>> + ;; guix environment guix-devel
>> + ;; to reliably get the development environment for Guix (using 'guix' for
>> + ;; this purpose does not work when 'guix' points to the built-from-tarball
>> + ;; package rather than to the built-from-checkout package.)
>> + (package
>> + (inherit guix-devel)
>> + (name "guix-devel")
>> + (source #f) ;not meant to be built
>> + (supported-systems '())))
>> +
>> (define (source-file? file stat)
>> "Return true if FILE is likely a source file, false if it is a typical
>> generated file."
>>
>>
>> ?
>>
>> If that’s fine with you, could you incorporate it in your patch?
>
> Sounds good to me. I've attached the updated patch to this email and
> mentioned you as co-author. The new package fails to build with a
> cryptic error, but since it isn't meant to be built, that seems OK.
>
> What is the purpose of temporarily changing the "guix" variable to refer
> to the release package (as in commit 4420940f)? Because it usually
> refers to the development version, wouldn't it be better to make the
> "guix" variable ALWAYS refer to the development version? It isn't clear
> to me why we need to temporarily change this variable to refer to the
> release version.
Somehow this question turned out to be difficult to answer to me, which
contributed to the delay. ;-)
I think you’re right: in a way, this is a bit silly. This is a purist’s
approach (when we have the tarball, no need to depend on Autoconf et
al.), but it would work just fine if we simply added the ‘native-inputs’
currently on ‘guix-devel’ to ‘guix-0.11.0’ itself.
If there are no objections, I’ll just do that.
Thanks, and sorry for taking so long for such a simple answer!
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: Make "guix-devel" a public variable in package-management.scm
2016-10-18 14:24 ` Ludovic Courtès
@ 2016-10-30 22:21 ` Ludovic Courtès
0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2016-10-30 22:21 UTC (permalink / raw)
To: Chris Marusich; +Cc: guix-devel
ludo@gnu.org (Ludovic Courtès) skribis:
> Chris Marusich <cmmarusich@gmail.com> skribis:
>
>> ludo@gnu.org (Ludovic Courtès) writes:
>
> [...]
>
>>> (define-public guix guix-devel)
>>>
>>> +(define-public guix-for-environment
>>> + ;; We provide this pseudo-package just to allow people to run:
>>> + ;; guix environment guix-devel
>>> + ;; to reliably get the development environment for Guix (using 'guix' for
>>> + ;; this purpose does not work when 'guix' points to the built-from-tarball
>>> + ;; package rather than to the built-from-checkout package.)
>>> + (package
>>> + (inherit guix-devel)
>>> + (name "guix-devel")
>>> + (source #f) ;not meant to be built
>>> + (supported-systems '())))
>>> +
>>> (define (source-file? file stat)
>>> "Return true if FILE is likely a source file, false if it is a typical
>>> generated file."
>>>
>>>
>>> ?
>>>
>>> If that’s fine with you, could you incorporate it in your patch?
>>
>> Sounds good to me. I've attached the updated patch to this email and
>> mentioned you as co-author. The new package fails to build with a
>> cryptic error, but since it isn't meant to be built, that seems OK.
>>
>> What is the purpose of temporarily changing the "guix" variable to refer
>> to the release package (as in commit 4420940f)? Because it usually
>> refers to the development version, wouldn't it be better to make the
>> "guix" variable ALWAYS refer to the development version? It isn't clear
>> to me why we need to temporarily change this variable to refer to the
>> release version.
>
> Somehow this question turned out to be difficult to answer to me, which
> contributed to the delay. ;-)
>
> I think you’re right: in a way, this is a bit silly. This is a purist’s
> approach (when we have the tarball, no need to depend on Autoconf et
> al.), but it would work just fine if we simply added the ‘native-inputs’
> currently on ‘guix-devel’ to ‘guix-0.11.0’ itself.
>
> If there are no objections, I’ll just do that.
Pushed as a7db8540a712b039aa518bfc4c58e7a6ce823858.
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-10-30 22:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-02 21:42 [PATCH] gnu: Make "guix-devel" a public variable in package-management.scm Chris Marusich
2016-10-05 21:35 ` Ludovic Courtès
2016-10-09 4:14 ` Chris Marusich
2016-10-18 14:24 ` Ludovic Courtès
2016-10-30 22:21 ` Ludovic Courtès
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.