From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: package dependencies Date: Mon, 14 Dec 2015 02:03:32 -0500 Message-ID: <20151214070332.GA13029@jasmine> References: <87zixjttsa.fsf@gmail.com> <20151209201329.20594c2e@weiserose.weiserose.de> <20151210045530.GA28215@thebird.nl> <87bn9uxy0l.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8NAP-0000o5-06 for guix-devel@gnu.org; Mon, 14 Dec 2015 02:03:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8NAL-00076z-Rv for guix-devel@gnu.org; Mon, 14 Dec 2015 02:03:28 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:60105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8NAL-00076n-Ou for guix-devel@gnu.org; Mon, 14 Dec 2015 02:03:25 -0500 Content-Disposition: inline In-Reply-To: <87bn9uxy0l.fsf@gnu.org> 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?iso-8859-1?Q?Court=E8s?= Cc: guix-devel@gnu.org On Sun, Dec 13, 2015 at 02:45:46PM +0100, Ludovic Courtès wrote: > Hello! > > I’ve rephrased the doc in “package Reference” in a way that is hopefully > clearer: > > ‘inputs’ (default: ‘'()’) > ‘native-inputs’ (default: ‘'()’) > ‘propagated-inputs’ (default: ‘'()’) > These fields list dependencies of the package. Each one is a > list of tuples, where each tuple has a label for the input (a > string) as its first element, a package, origin, or derivation > as its second element, and optionally the name of the output > thereof that should be used, which defaults to ‘"out"’ (*note > Packages with Multiple Outputs::, for more on package > outputs). For example, the list below specifies 3 inputs: > > `(("libffi" ,libffi) > ("libunistring" ,libunistring) > ("glib:bin" ,glib "bin")) ;the "bin" output of Glib > > The distinction between ‘native-inputs’ and ‘inputs’ is > necessary when considering cross-compilation. When > cross-compiling, dependencies listed in ‘inputs’ are built for > the _target_ architecture; conversely, dependencies listed in > ‘native-inputs’ are built for the architecture of the _build_ > machine. > > ‘native-inputs’ is typically where you would list tools needed > at build time but not at run time, such as Autoconf, Automake, > pkg-config, Gettext, or Bison. ‘guix lint’ can report likely > mistakes in this area (*note Invoking guix lint::). > > Lastly, ‘propagated-inputs’ is similar to ‘inputs’, but the > specified packages will be force-installed alongside the > package they belong to (*note ‘guix package’: > package-cmd-propagated-inputs, for information on how ‘guix > package’ deals with propagated inputs.) > > For example this is necessary when a library needs headers of > another library to compile, or needs another shared library to > be linked alongside itself when a program wants to link to it. I think it's a good improvement! This is a big obstacle for new packagers. It may be worth linking between the sections about propagated-inputs and the python-build-system, since the situation is somewhat different there. At least in a footnote. > > HTH! > > Ludo’. >