unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Lirzin <mthl@gnu.org>
To: "Thompson, David" <dthompson2@worcester.edu>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: 'guix environment' as a build tool.
Date: Sun, 31 Jul 2016 06:17:08 +0200	[thread overview]
Message-ID: <8737mqjvaz.fsf@gnu.org> (raw)
In-Reply-To: <CAJ=Rwfbm-emzkrdp2C7yiiDqK66qe338GreMn56v6Oju=p-9mA@mail.gmail.com> (David Thompson's message of "Sat, 30 Jul 2016 22:20:42 -0400")

"Thompson, David" <dthompson2@worcester.edu> writes:

> On Sat, Jul 30, 2016 at 10:05 PM, Mathieu Lirzin <mthl@gnu.org> wrote:
>> ludo@gnu.org (Ludovic Courtès) writes:
>>
>>> Mathieu Lirzin <mthl@gnu.org> skribis:
>>>
>>>> I have tested successfully with the following command on a foreign
>>>> system:
>>>>
>>>>   guix environment --ad-hoc automake pkg-config guile guix libgcrypt sqlite guile-sqlite3
>>>>
>>>> Tell me if it works for you.
>>>>
>>>>> How about including a guix package definition then we can easily build
>>>>> it assuming "we" know how to do out-of-guix-tree package building :)
>>>>
>>>> It would indeed be nice to provide an easy way for Guix users to install
>>>> Cuirass.  IMHO package definitions meant as a development build tool is
>>>> confusing and should be avoided.  Nonetheless, I think it is useful to
>>>> document the previous 'guix environment ...' command in the README.
>>>
>>> What about providing a ‘guix.scm’ file that people could pass to ‘guix
>>> environment -l’ (instead of typing the long command above), and to ‘guix
>>> package -f’ (info "(guix) Invoking guix package")?
>>
>> 'guix environment -l' uses a package definition.  To me this abstraction
>> doesn't fit well in a development context:
>
> It *does* fit well.  This use-case is why I wrote 'guix environment'
> in the first place.

Obviously I disagree.

>>  - the origin hash doesn't make sense.
>
> You don't need one.  Use local-file for the source field.

I would be happy to, however I vaguely remember trying this without
success for Mcron.  Do you have an example to provide?

>>  - packages already included in Guix have redundant description and synopsis.
>
> I don't understand what this means.
>
>>  - package definitions rely on Guix internals.
>
> The package API rarely changes in practice.

This is relative, IME packages moving across modules is not an
exception.

>> In fact what 'guix.scm' contains feels more like a "debian" directory or
>> a "PACKAGE.spec" file on steroid because of the "guix environment -l"
>> feature which derives from it but doesn't appear as first class.
>>
>> An idea that I like better and is less invasive, would be to complement
>> bootstrap scripts with:
>>
>>   ./bootstrap --with-guix
>>
>> This command would:
>>
>> - generate a guix-env script that wraps 'guix environment ...' if it
>>   doesn't exist.
>> - Invoke ./guix-env
>> - Invoke autoreconf -vfi
>>
>> if the user wants to enter this environment Later it will have to invoke
>> './guix-env'.
>
> This just makes things more inconvenient and limits potential utility.
> You would lose the ability to tweak the dependency graph with custom
> package recipes.
>  I do this frequently in my projects that use bleeding edge features
> of other software that may not even have an official release yet.

Since this script is supposed to be wrapper around 'guix environment' I
don't understand how it could limit anything 'guix environment' could
do?

> Also, with a package file, Guix users can install the development
> snapshot with 'guix package -f' or simply build it with 'guix build
> -f'.

I am not sure what you mean by "development snapshot". If you an
arbitrary timely chosen commit like what is done for Haunt:

  (origin
    (method git-fetch)
    (uri (git-reference
         (url "git://dthompson.us/haunt.git")
         (commit "f0a7c2b14a201448432d3564d851ee0686d5b1b1")))
         (sha256
          (base32
           "1dnzsw18blhr8admw48zbl3ilz3iiqmb149i37y820h0imqfli0v"))))

This is not useful for me.  In most case I want 'guix build -f' to build
the current commit from the local repository.  If 'local-file' can work
then this is fine, but I have never achieved the expected result.

>> Some interesting things could be done beyond this, for example by using
>> per repository profiles that would save development environments.  This
>> would allow developpers to easily use different setups.
>
> 'guix environment' already serves this purpose.
>  I do want to extend 'guix environment' with a --save flag that will
> register the profile it generates as a GC root so that it can be saved
> for future sessions so that the environment doesn't need to be rebuilt
> every time the user upgrades Guix.

That would be nice.

> Hopefully this clears things up

Maybe I am misinterpreting, but this read a bit patronizing.  No need to
say that if this is the case I don't appreciate much.

-- 
Mathieu Lirzin

  reply	other threads:[~2016-07-31  4:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-29 20:10 [GSoC] Continuous integration tool à la Hydra Mathieu Lirzin
2016-05-30 21:34 ` Ludovic Courtès
2016-05-30 21:54 ` Ludovic Courtès
2016-06-20 22:44 ` Mathieu Lirzin
2016-06-24 12:42   ` Ludovic Courtès
2016-07-25  0:30 ` Mathieu Lirzin
2016-07-25 21:36   ` Ludovic Courtès
2016-07-27 14:28     ` Mathieu Lirzin
2016-07-28 12:38       ` Ludovic Courtès
2016-07-29 11:20     ` Florian Paul Schmidt
2016-07-29 19:26       ` Mathieu Lirzin
2016-07-30 22:49         ` Ludovic Courtès
2016-07-31  2:05           ` 'guix environment' as a build tool. (was: [GSoC] Continuous integration tool à la Hydra.) Mathieu Lirzin
2016-07-31  2:20             ` Thompson, David
2016-07-31  4:17               ` Mathieu Lirzin [this message]
2016-07-31 13:55               ` 'guix environment' as a build tool Ludovic Courtès
2016-07-31 14:07                 ` Thompson, David
2016-07-31 20:09                   ` Ludovic Courtès
2016-07-31 11:13             ` Ludovic Courtès
2016-07-31  7:09         ` [GSoC] Continuous integration tool à la Hydra Florian Paul Schmidt
2016-07-31 12:03           ` Mathieu Lirzin
2016-08-01 18:55             ` Florian Paul Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737mqjvaz.fsf@gnu.org \
    --to=mthl@gnu.org \
    --cc=dthompson2@worcester.edu \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).