[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] scripts: package: Add --install-from-file option.
From: |
Thompson, David |
Subject: |
Re: [PATCH] scripts: package: Add --install-from-file option. |
Date: |
Wed, 19 Aug 2015 09:04:15 -0400 |
On Wed, Aug 19, 2015 at 4:27 AM, Amirouche Boubekki
<address@hidden> wrote:
> Le 2015-08-09 17:59, David Thompson a écrit :
>>
>> In my personal projects, I keep a 'package.scm' file in the root of the
>> source tree for use with 'guix environment -l'. However, it's also
>> handy to install that package by using 'guix package -e':
>>
>> guix package -e '(primitive-load "package.scm")'
>>
>> This patch adds a shorthand for this:
>>
>> guix package -f package.scm
>
>
> What about dispatch `guix package -i` depending on the argument. In
> principle there will be no "*.scm$" packages so the above could be
>
> guix package -i package.scm
>
> The idea behind that is to keep the number of command to minimum. In this
> case, IMO, it makes sens to merge both logic inside the same UI.
That won't work because it creates ambiguities in the package spec
syntax. How can one tell if a package spec or a file name was passed
with 100% accuracy? 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.
- Dave