From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:42331) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iekWL-00046r-Iz for guix-patches@gnu.org; Tue, 10 Dec 2019 13:46:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iekWJ-0005Fw-Me for guix-patches@gnu.org; Tue, 10 Dec 2019 13:46:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50617) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iekWI-0005FG-ID for guix-patches@gnu.org; Tue, 10 Dec 2019 13:46:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iekWI-00041b-Fd for guix-patches@gnu.org; Tue, 10 Dec 2019 13:46:02 -0500 Subject: [bug#37478] [PATCH] Support canonical guix environment -l guix.scm. Resent-Message-ID: MIME-Version: 1.0 References: <871rw88u5s.fsf@gnu.org> <871rw4mro9.fsf@gnu.org> <87k19jy26l.fsf@gnu.org> <874ky8n5nw.fsf@posteo.net> In-Reply-To: <874ky8n5nw.fsf@posteo.net> From: "Thompson, David" Date: Tue, 10 Dec 2019 13:45:18 -0500 Message-ID: Content-Type: text/plain; charset="UTF-8" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Brett Gilio Cc: 37478@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= , Jan Nieuwenhuizen Hi, On Mon, Dec 9, 2019 at 11:53 PM Brett Gilio wrote: > > Hey all, where are we standing with this currently? I think there has > been some recent revisions with how we are using the `-l` flag, and want > to see if this still needs to some work. I am happy to offer my help. I think it would be great if y'all could come to a consensus on a canonical Guix environment file name (shortly after writing 'guix environment' I started using 'guix.scm' files in the root of my project repos in lieu of any convention) and, additionally, establish whether that file evaluates to a package or to a manifest (or maybe it could be either!) I will change my project repos to conform to the established convention. To elaborate a bit on the choices, I've discovered there are pros and cons to -l and -m and I've flip-flopped on which I liked better, but today I find manifests to be the better option for the "I just cloned a repo and want to build a dev environment" use-case. Most of my project environments are created via 'guix environment -l guix.scm' and the contents of 'guix.scm' look something like this: (package (name "chickadee") (version "0.1") (source #f) (build-system gnu-build-system) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) ("pkg-config" ,pkg-config) ("texinfo" ,texinfo))) (inputs `(("guile" ,target-guile) ("libvorbis" ,libvorbis) ("openal" ,openal))) (propagated-inputs `(("guile-opengl" ,guile-opengl) ("guile-sdl2" ,guile-sdl2))) (synopsis "Game development toolkit for Guile Scheme") (description "Chickadee is a game development toolkit for Guile Scheme. It contains all of the basic components needed to develop 2D/3D video games.") (home-page "https://dthompson.us/projects/chickadee.html") (license gpl3+)) Initially I thought a package made sense because, in addition to being used as the basis of a dev environment, I could build the same file as part of a CI system or pre-release make target, but in practice I can't really do that, thus the '(source #f)' bit and all the other boilerplate like version, synopsis, description, and license fields to satisfy the syntax rules. It's also not a suitable package for upstreaming to Guix later because building from git requires additional dependencies that aren't needed when building from a release tarball. So, if I were to rewrite this file today, I think I would just make a manifest instead. Of course, Guix could also just eval the file, use package? and manifest? predicates to see what it got, and act accordingly. That might be the best choice from a usability standpoint. - Dave