From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SNeHOu9RJmJoLgEAgWs5BA (envelope-from ) for ; Mon, 07 Mar 2022 19:41:51 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id KPHbN+9RJmIRhgAA9RJhRA (envelope-from ) for ; Mon, 07 Mar 2022 19:41:51 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A28393D7EE for ; Mon, 7 Mar 2022 19:41:51 +0100 (CET) Received: from localhost ([::1]:53972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRIIn-0007Lg-8n for larch@yhetil.org; Mon, 07 Mar 2022 13:41:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRI8l-0008RB-7H for guix-devel@gnu.org; Mon, 07 Mar 2022 13:31:28 -0500 Received: from smtp.polymtl.ca ([132.207.4.11]:40483) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRI8h-0007cM-Tl for guix-devel@gnu.org; Mon, 07 Mar 2022 13:31:25 -0500 Received: from localhost (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 227IVASS003216 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 7 Mar 2022 13:31:15 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 227IVASS003216 To: Kaelyn Cc: guix-devel@gnu.org Subject: Re: Package's inputs for developer? In-Reply-To: References: <87ee3fvys1.fsf@laura> Date: Mon, 07 Mar 2022 13:31:10 -0500 Message-ID: <87bkyhwr69.fsf@laura> MIME-Version: 1.0 Content-Type: text/plain X-Poly-FromMTA: (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) at Mon, 7 Mar 2022 18:31:10 +0000 Received-SPF: pass client-ip=132.207.4.11; envelope-from=olivier.dion@polymtl.ca; helo=smtp.polymtl.ca X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list 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+larch=yhetil.org@gnu.org Sender: "Guix-devel" Reply-to: Olivier Dion From: Olivier Dion via "Development of GNU Guix and the GNU System distribution." X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646678511; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=l9vJk+4Vah2q3ZyUHMYKPLpkTz3KdWoEbvmD34/wxrQ=; b=Z5yIW9pvqgXvLFFM1ZH8Z0ReisfVoWDQsUpD8CUX2R83gVTbQbcYefJge2j/3DMuZF1OuI TKjAQguKFF389G0n0vfiPrP7svCw6RIIkCNk/N6MXtE2N/KkTEOdzQ+E4rWt/ghUp8XV8A wEd3wj3LruYO+aAPV6dev6id1sRwH7/50XMU7cfA/P7/qWHyIat2yFo7Yhggn17T98gR/r FLwLLRTivbxXDFGXgSeW5+mGLDh9FcFnkw15fFzJwD4/asYV6ShKK8rWyBfee2zbC0DLL6 VHdoQTh+VhvNAV1UL0/IICelLffLGlmwZiFyGkfzNC5n8b8Lv/85Z3CrggJ3YA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646678511; a=rsa-sha256; cv=none; b=A7Qro8tJrM2fi1kw4mIwtys6UD/vWurMgdMVc9sjZU+YWUQEJxpPifcv1yLe6Rx8RIMl56 afYU36YJ7qxvStGVqSit6GLu63ZyUxr+YMVfP1c1jHIO6XNmCoOXYLWb8iPPxOHmm2tfbA CVXM0aANkpcVjpuVhagYHhnExJu67NDWwz8NdPOfMp1Pftcg6sIVC9wQclFOo2eXJDQui2 a0NlLOHtl+cdsfEiqgtMcIHZpCs+tt0SW1GziU15WeKMaCLVnm3hMwRoOYG+DObmtfQG2/ D7wTlVb10efVQng7ica3cH7cXHJ1HA2KDe1hf5s5K9M1prl00lt03JKjyLeMxw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.52 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A28393D7EE X-Spam-Score: -2.52 X-Migadu-Scanner: scn0.migadu.com X-TUID: 6WR4HNXqYY5I On Mon, 07 Mar 2022, Kaelyn wrote: > On Sunday, March 6th, 2022 at 8:19 AM, Olivier Dion via "Development of GNU Guix and the GNU System distribution." 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? Only for convenience of developing. I also use the developer inputs for continuous integration for generating coverage report for example. I guess that all of this can be wrapped under a script such as `development-env` and use `guix shell` in it. > 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`. I agree it's not very flexible. I basically impose the usage of GDB for debugging here. I guess that using `guix shell` is the correct way of doing so then. Regards, old -- Olivier Dion Polymtl