From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: [PATCH] gnu: Make "guix-devel" a public variable in package-management.scm Date: Sat, 08 Oct 2016 21:14:13 -0700 Message-ID: <8737k617my.fsf@gmail.com> References: <8760patokz.fsf@gmail.com> <87a8ei5vj2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bt5VE-0001FY-NH for guix-devel@gnu.org; Sun, 09 Oct 2016 00:14:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bt5VD-0008BH-19 for guix-devel@gnu.org; Sun, 09 Oct 2016 00:14:20 -0400 In-Reply-To: <87a8ei5vj2.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 05 Oct 2016 23:35:29 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hi, > > Chris Marusich 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=E2=80=99t 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 >> 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 environme= nt for >> building Guix from a Git checkout. >> >> * gnu/packages/package-management.scm (guix-devel): Make it public and g= ive 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 rel= ease >> 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 mach= ine >> +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 whi= ch 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.")))) >>=20=20 >> (define-public guix guix-devel) > > There=E2=80=99s the problem that the =E2=80=98guix-devel=E2=80=99 variabl= e above is also the > Guix package that we currently use, and thus it should be called =E2=80= =9Cguix=E2=80=9D, > not =E2=80=9Cguix-devel=E2=80=9D. > > So what about something along these lines: > > > diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-m= anagement.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.") >=20=20 > (define-public guix guix-devel) >=20=20 > +(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-tar= ball > + ;; 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=E2=80=99s 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=E2=80=99s useful to provide a specialized synopsis like= you > did, but I think it=E2=80=99s better to leave the description unchanged r= ather > than duplicate it almost identical. That's fine with me, too. Thank you for your review! =2D-=20 Chris --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-Add-guix-for-environment-variable.patch Content-Transfer-Encoding: quoted-printable From=20c58273cd40a645f58fa4397049656095fae9c3fc Mon Sep 17 00:00:00 2001 From: Chris Marusich 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=3DUTF-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=C3=A8s =2D-- 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 =2D-- a/README +++ b/README @@ -54,7 +54,8 @@ For information on installation from a Git checkout, plea= se see the section You can re-build and re-install Guix using a system that already runs Guix. To do so: =20 =2D - 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: =20 guix environment guix =20 diff --git a/doc/contributing.texi b/doc/contributing.texi index 18d891d..50657de 100644 =2D-- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -50,14 +50,14 @@ all the dependencies and appropriate environment variab= les are set up to hack on Guix: =20 @example =2Dguix environment guix +guix environment guix-devel @end example =20 @xref{Invoking guix environment}, for more information on that command. Extra dependencies can be added with @option{--ad-hoc}: =20 @example =2Dguix environment guix --ad-hoc help2man git strace +guix environment guix-devel --ad-hoc git strace @end example =20 Run @command{./bootstrap} to generate the build system infrastructure diff --git a/doc/guix.texi b/doc/guix.texi index f5bbb92..e03b4a4 100644 =2D-- a/doc/guix.texi +++ b/doc/guix.texi @@ -5609,7 +5609,7 @@ the following command creates a Guix development envi= ronment that additionally includes Git and strace: =20 @example =2Dguix environment guix --ad-hoc git strace +guix environment guix-devel --ad-hoc git strace @end example =20 Sometimes it is desirable to isolate the environment as much as diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-man= agement.scm index 4cc5b89..01221df 100644 =2D-- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -255,6 +255,18 @@ the Nix package manager.") =20 (define-public guix guix-devel) =20 +(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-tarba= ll + ;; 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." =2D-=20 2.9.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX+cQXAAoJEN1AmhXYIkadOVoP/A8ARhGMXpncOdIlCNNPxH7e FD67PP83IzEjQ8qVlpQ3keRY5TZXsg3T/x63aZSJnBxXi/EkZ2xMg/kxXfGNdEaN 04zZQKcsM/mk5eC58uA3DPQJIaEcBq2m9XtLshGt/mqBM74k0NPdENfYYvUnTxFN e5Z4135vMM/jgIPVgGKWsTdalbu7CeCYSanZ8EwaQ+r8bjNbGJb7kwjdhtVAWF0P GYYvXr3F3uAA5Ek2oJ5UxoejpWp2eO0BR1SF/cFmsCYEO2IaOo81K7IUY/Gkjmxn T6LiA2TqOn9hR7J06qNhCoF+C/RthDwfR3o/RrGhWS/qm01FkLrptpoHdVELMh7X PSviaEb/HXcFz3pajRiyhUyAjr8C3ByYvvWUsNuNHdAyH42zdgGUTvbIzu3gCGMj 4TSTW6DhABeEwOAmUoxniWt62Wr9CXlk15cuulpkJ4csFL8u/wKS8XdyuEpkvp1l enhfZazrz7FVqBq8kTnLjaVXmHQWr7zv4bCFC0mtmX2kkYY2kWmCz0baMwFGwWT9 CzUgzl4BKIl/EmoxT+94Zfwv0R/mYKMq8Lzama8bqaMQJp1JLgGqoxRs36AU26ke dmkLyH5V3eIVQwhAwnUmjd++lyr5qDQfM9ZRBI3FfWCOfnXeHhs/ZuVA9ozn0wkZ 7bmiiciOv1iy8YVpbMha =E9ND -----END PGP SIGNATURE----- --==-=-=--