guix-devel
[Top][All Lists]
Advanced

[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: Tue, 18 Aug 2015 20:17:55 -0400

On Tue, Aug 18, 2015 at 3:30 PM, Ludovic Courtès <address@hidden> wrote:
> David Thompson <address@hidden> skribis:
>
>> 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
>
> Makes sense.
>
>> The motivation for this is to ultimately encourage other people to keep
>> a 'package.scm' file in their own repos for building reproducible
>> development environments and easily testing development snapshots, like
>> what we do with our 'guix-devel' package.
>
> Nice.  The bottom line though is that we don’t quite guarantee stability
> of the “API” of the package modules.

Understood.  In practice, I haven't found this to be a big deal.  I
provide package.scm files in all of my projects now and it's been a
huge win for making it easier to quickly get hacking on a new machine.

>> I'd like to add the same option for 'guix build', if this is approved.
>
> Sure.

Great. :)

>> From 07c9b35facf810872f3bc8342e18b33033714adf Mon Sep 17 00:00:00 2001
>> From: David Thompson <address@hidden>
>> Date: Sun, 9 Aug 2015 11:35:51 -0400
>> Subject: [PATCH] scripts: package: Add --install-from-file option.
>>
>> * guix/scripts/package.scm (show-help): Add help text for --install-from-file
>>   option.
>>   (%options): Add --install-from-file option.
>> * doc/guix.texi ("invoking guix package"): Document it.
>
> [...]
>
>> +(use-modules (guix packages)
>> +             (guix download)
>> +             (guix build-system gnu)
>> +             (guix licenses))
>
> Just (use-modules (guix) (guix licenses))?

I needed: (use-modules (guix) (guix build-system gnu) (guix licenses))

> Can you put the example in a separate file (like
> doc/environment-gdb.scm)?  That will allow us to easily check that the
> file is indeed valid.

Done.

>> +  (arguments `(#:configure-flags '("--enable-silent-rules")))
>> +  (inputs `(("gawk" ,gawk)))
>
> I think these two lines can be removed.

Yeah.  BTW, I copy/pasted this from the "Defining Packages" section,
and that example appears to be broken because it doesn't import the
(gnu packages gawk) module.

>> address@hidden example
>
> Here it would be good to add a sentence or two like the paragraph you
> wrote above about the motivation for all this.

Added a sentence about it.

> Could you send an updated patch?

Attached.  Thanks for the review.

- Dave

Attachment: 0001-scripts-package-Add-install-from-file-option.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]