unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kaelyn <kaelyn.alexi@protonmail.com>
To: Olivier Dion <olivier.dion@polymtl.ca>
Cc: guix-devel@gnu.org
Subject: Re: Package's inputs for developer?
Date: Mon, 07 Mar 2022 17:17:11 +0000	[thread overview]
Message-ID: <n8R5z7c1URcf_iVArPbffKZAmfgk9t6lwICUr2QLWTU6DjxYqJ8Jk1brOMghyzDPhj3zn7yARzED03UnNuowxd_gIyaWGAUx5FAjPkfvL64=@protonmail.com> (raw)
In-Reply-To: <87ee3fvys1.fsf@laura>

Hello,

On Sunday, March 6th, 2022 at 8:19 AM, Olivier Dion via "Development of GNU Guix and the GNU System distribution." <guix-devel@gnu.org> wrote:

> Hi Guix,
>
> I often find my self using inheritance of package to add native-inputs
>
> that are not stricly necessary for building the project, but are used
>
> for developement purpose like so:
>
> -------------------------------------------------
>
> (define base-native-inputs (list ...))
>
> (define my-package
>
> (package
>
> ...
>
> (native-inputs base-native-inputs)
>
> ...))
>
> ;; Developers version
>
> (package
>
> (inherit my-package)
>
> (native-inputs
>
> (append base-native-inputs
>
> (list gdb lcov))))
>
> -------------------------------------------------
>
> I guess this is the correct way of doing it or perhaps I should put gdb
>
> and lcov in the base-native-inputs?. But I was thinking that perhaps
>
> something like `(developer-inputs (list gdb lcov))` would be better,
>
> since these inputs are not stricly necessary for building the package.

Can you give a bit more detail about what the use case is for adding developer tools as inputs?

The inheritance you describe seems more cumbersome than simply doing `guix shell gdb lcov -D my-package` to enter a development environment with gdb and lcov present, while also being a bit more limited when there are multiple tools with a similar function. In the above example, imagine if a developer wants to debug my-package using lldb instead of gdb--the developer-inputs would require transforming the package definition, but the ad-hoc invocation could simply be `guix shell lldb lcov -D my-package`.

Cheers,
Kaelyn

>
> Regards,
>
> old
>
> --
>
> Olivier Dion
>
> Polymtl


  reply	other threads:[~2022-03-07 17:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-06 16:19 Package's inputs for developer? Olivier Dion via Development of GNU Guix and the GNU System distribution.
2022-03-07 17:17 ` Kaelyn [this message]
2022-03-07 18:31   ` Olivier Dion via Development of GNU Guix and the GNU System distribution.
2022-03-08 16:00 ` zimoun
2022-03-08 16:45   ` Olivier Dion via Development of GNU Guix and the GNU System distribution.
2022-03-08 18:44     ` zimoun
2022-03-08 17:06 ` Danny Milosavljevic
2022-03-08 20:24 ` Liliana Marie Prikler

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='n8R5z7c1URcf_iVArPbffKZAmfgk9t6lwICUr2QLWTU6DjxYqJ8Jk1brOMghyzDPhj3zn7yARzED03UnNuowxd_gIyaWGAUx5FAjPkfvL64=@protonmail.com' \
    --to=kaelyn.alexi@protonmail.com \
    --cc=guix-devel@gnu.org \
    --cc=olivier.dion@polymtl.ca \
    /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).