From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id NPRLHBSCh1/cDQAA0tVLHw (envelope-from ) for ; Wed, 14 Oct 2020 22:56:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id r7KgFxSCh1/AfAAAbx9fmQ (envelope-from ) for ; Wed, 14 Oct 2020 22:56:20 +0000 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 9A2479404CC for ; Wed, 14 Oct 2020 22:56:19 +0000 (UTC) Received: from localhost ([::1]:41450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSpgw-0002vS-Fw for larch@yhetil.org; Wed, 14 Oct 2020 18:56:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSpgK-0002uG-Vf; Wed, 14 Oct 2020 18:55:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38350) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSpgK-0004N6-I9; Wed, 14 Oct 2020 18:55:40 -0400 Received: from [2601:300:4103:7800:8890:3e68:951b:d7ee] (port=45274 helo=debian) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kSpgH-0006SX-A9; Wed, 14 Oct 2020 18:55:38 -0400 From: Brett Gilio To: Simon South Subject: Re: Specifying dependencies among package outputs? References: <87eem0l9qc.fsf@simonsouth.net> Date: Wed, 14 Oct 2020 17:55:36 -0500 In-Reply-To: <87eem0l9qc.fsf@simonsouth.net> (Simon South's message of "Wed, 14 Oct 2020 18:32:27 -0400") Message-ID: <878sc8zac7.fsf@debian> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org, help-guix@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 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@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: /hnsjYKbWoSX Simon South writes: > Am I right in thinking there is no way to specify dependencies among the > outputs of a single package? To specify that a package's "out" output > depends on its "lib" output, for instance. > > I ask because the Knot package (in gnu/package/dns.scm) builds a number > of logically distinct targets---daemon, libraries, administrative > utilities, general-purpose utilities, and documentation---and it would > be nice to separate at least some of these into individual outputs, in > part because we could then specify only the libraries as a dependency of > Knot Resolver. > > However, Knot's daemon and utilities have the same dependency on its own > libraries, so pulling those into a separate "lib" output would be liable > to break everything else. > > I've searched and can't find an example of this being done, nor can I > find any mention of it in the documentation. So I assume it's simply not > possible, and you would need to define an entirely separate package that > builds from the same source code---right? Unless I am mistaken, this is not possible. When using a specific output, it still fetches the entire package closure. But only that specific output propagates to the profile. Adding an output as a dependency would surely cause a non-termination situation with the interpreter. I have cc'ed guix-devel as I think that is the better fit for this question. Best -- Brett M. Gilio https://brettgilio.com