From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amirouche Boubekki Subject: Re: [PATCH] scripts: package: Add --install-from-file option. Date: Wed, 19 Aug 2015 17:31:55 +0200 Message-ID: <60d219d4d56e5edce70da79239efc059@hypermove.net> References: <8737zs78rs.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <57add006a9e098fd69e269f1082262c7@hypermove.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZS5LS-00011s-63 for guix-devel@gnu.org; Wed, 19 Aug 2015 11:32:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZS5LR-000666-2t for guix-devel@gnu.org; Wed, 19 Aug 2015 11:32:05 -0400 In-Reply-To: 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: "Thompson, David" Cc: guix-devel , guix-devel-bounces+amirouche=hypermove.net@gnu.org Le 2015-08-19 15:04, Thompson, David a =C3=A9crit=C2=A0: > On Wed, Aug 19, 2015 at 4:27 AM, Amirouche Boubekki > wrote: >> Le 2015-08-09 17:59, David Thompson a =C3=A9crit : >>>=20 >>> In my personal projects, I keep a 'package.scm' file in the root of=20 >>> the >>> source tree for use with 'guix environment -l'. However, it's also >>> handy to install that package by using 'guix package -e': >>>=20 >>> guix package -e '(primitive-load "package.scm")' >>>=20 >>> This patch adds a shorthand for this: >>>=20 >>> guix package -f package.scm >>=20 >>=20 >> What about dispatch `guix package -i` depending on the argument. In >> principle there will be no "*.scm$" packages so the above could be >>=20 >> guix package -i package.scm >>=20 >> The idea behind that is to keep the number of command to minimum. In=20 >> this >> case, IMO, it makes sens to merge both logic inside the same UI. >=20 > That won't work because it creates ambiguities in the package spec > syntax. Thanks. > How can one tell if a package spec or a file name was passed > with 100% accuracy? Honestly I have the feeling that you are pushing your idea more than=20 trying to make things better. - Adding the `-f` modifier won't help make guix package command easy to=20 the mind. - Especially since the command it will replace is simple - The command targets developpers and is only useful in the context of=20 building project from sources which are not released. It can go inside a=20 Makefile. For this reason I don't like it being inside guix. > You can't, and we'd have to use a heuristic that > would surely fail in some awful way for someone. It's best for this > to be a separate argument. You know you are wrong. You can simply ban packages which ends with .scm=20 which is not too difficult to do and is already possible with current=20 packages. My opinion, is that instead of adding options/modifiers to "guix=20 package", it should be split into "guix package install", "guix package=20 search", "guix package show" and "guix package generation". It might not=20 be obvious and is afaik not a cli layout that is widespread but it will=20 greatly help people get their hands on guix. I get lost and don't remember all the apt-foo commands and what they are=20 supposed to do. Using this scheme will keep each subcommand --help (or=20 just help) more readable.