From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: Improving the usability of 'guix environment' Date: Tue, 10 Feb 2015 11:45:02 -0500 Message-ID: <87fvadhg1d.fsf@fsf.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLDvu-00027L-AW for guix-devel@gnu.org; Tue, 10 Feb 2015 11:45:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLDvs-0002SK-JH for guix-devel@gnu.org; Tue, 10 Feb 2015 11:45:06 -0500 Received: from mail.fsf.org ([208.118.235.13]:36022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLDvs-0002S6-Gz for guix-devel@gnu.org; Tue, 10 Feb 2015 11:45:04 -0500 Received: from 209-6-40-86.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.40.86]:33656 helo=izanagi) by mail.fsf.org with esmtpsa (TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1YLDvr-0002ah-Jp for guix-devel@gnu.org; Tue, 10 Feb 2015 11:45:04 -0500 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org As I use 'guix environment', I realize that I often do not want to create an environment from the inputs of a package, but rather that I want to create an environment from the package itself. I didn't think it was an issue when I did the initial development, but in practice it has proven to be inconvenient. For example, a development environment for guix-web requires autoconf, automake, guile-2.0, guile-json, and libgcrypt. To create such an environment, I currently use a dummy package: ;; env.scm (package (name "guix-web") (version "0.1") (source ".") (build-system gnu-build-system) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake))) (inputs `(("guile" ,guile-2.0) ("guile-json" ,guile-json) ("libgcrypt" ,libgcrypt))) (synopsis "Web frontend for GNU Guix") (description "Guix-web is a web interface to the GNU Guix package manager written in GNU Guile Scheme and JavaScript.") (home-page "https://gitorious.org/guix-web/guix-web") (license agpl3+)) ;; shell guix environment -l env.scm But all of that boilerplate is unnecessary since it's not possible to actually build the package successfully without a proper hash of the source AFAICT. Really, I would rather just use a simple list of packages: (list autoconf automake guile-2.0 guile-json libgcrypt) And other times it would be nice to create an ad-hoc environment from the shell for quickly experimenting with something and not polluting a profile: guix environment guile guile-sdl # let's tinker with SDL in Guile I propose adding a new flag that indicates whether we want the packages themselves or their inputs in the environment. If we assume that the default behavior is to include the packages themselves, a --inputs flag could indicate to use the package(s) inputs instead: guix environment --inputs emacs Thoughts? -- David Thompson Web Developer - Free Software Foundation - http://fsf.org GPG Key: 0FF1D807 Support the FSF: https://fsf.org/donate