From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8F5lIzKawF4gVAAA0tVLHw (envelope-from ) for ; Sun, 17 May 2020 01:58:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0NdHHzKawF4/HwAAB5/wlQ (envelope-from ) for ; Sun, 17 May 2020 01:58:10 +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 DFEEA940C01 for ; Sun, 17 May 2020 01:58:09 +0000 (UTC) Received: from localhost ([::1]:57010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ja8Z5-0006F8-GN for larch@yhetil.org; Sat, 16 May 2020 21:58:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ja8Z0-0006F0-CW for guix-patches@gnu.org; Sat, 16 May 2020 21:58:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58688) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ja8Z0-0004oB-3f for guix-patches@gnu.org; Sat, 16 May 2020 21:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ja8Z0-0004gW-0K for guix-patches@gnu.org; Sat, 16 May 2020 21:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41294] [PATCH] gnu: Add libfreenect. Resent-From: iyzsong@member.fsf.org (=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 17 May 2020 01:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41294 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ekaitz Zarraga Cc: "41294@debbugs.gnu.org" <41294@debbugs.gnu.org> Received: via spool by 41294-submit@debbugs.gnu.org id=B41294.158968064517966 (code B ref 41294); Sun, 17 May 2020 01:58:01 +0000 Received: (at 41294) by debbugs.gnu.org; 17 May 2020 01:57:25 +0000 Received: from localhost ([127.0.0.1]:42001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ja8YA-0004fS-Kx for submit@debbugs.gnu.org; Sat, 16 May 2020 21:57:25 -0400 Received: from rezeros.cc ([45.76.207.221]:49298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ja8Y8-0004fE-VI for 41294@debbugs.gnu.org; Sat, 16 May 2020 21:57:09 -0400 Received: from localhost ( [117.173.227.26]) by rezeros.cc (OpenSMTPD) with ESMTPSA id c97d6fbe (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Sun, 17 May 2020 01:57:01 +0000 (UTC) Received: from gift (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 677d47cf; Sun, 17 May 2020 01:56:43 +0000 (UTC) From: iyzsong@member.fsf.org (=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?=) References: <5kf9uJF2SDo9zwlTUoFI13o7P7q68o-AuSp72MvOp5PUaF2SlAPxzQJvFws5aaTOB5EHY4T3-En0Mhba7hADMIeJkgCeWUOY_Ciy0fv24Ck=@elenq.tech> <87k11c5ymm.fsf@member.fsf.org> Date: Sun, 17 May 2020 09:56:43 +0800 In-Reply-To: (Ekaitz Zarraga's message of "Sat, 16 May 2020 10:18:26 +0000") Message-ID: <87wo5b1fz8.fsf@member.fsf.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=fsf.org (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -0.91 X-TUID: Dho2lm+UR5g+ Ekaitz Zarraga writes: > Hi, > > On Saturday, May 16, 2020 5:48 AM, wrote: > >> We generally try to enable all optional features when adding a package, >> I'd go with: >> >> 1. Build the python bindings by default. >> 2. Try seperate the python bindings into another output. (eg: newt) >> 3. If 1 and 2 seems difficult, try add a seperate package for the >> python bindings, and it better only contains the bindings, reuse the >> original package as input. (eg: python-libxml2) >> >> 4. If not feel lucky, just leave a TODO comment for it... >> > > I don't really like the first because it forces you to add a python inter= preter that is not needed otherwise. > 2 and 3 sound good to me. Sure, to me both are acceptable. > It can handle both python2 and 3. What would you do with that? > Maybe make option 3 and add two outputs to that with python2 and python3?= Or two different packages? > (or just forget the python2?) Unless there is a need for the python2 bindings, we should forget it, as Python 2 is end-of-life. > >> >> > - The package is 300 megs checking `guix size` that's because it >> > has some testing binaries that have extra dependencies. If only >> > the library is compiled it doesn't depend on GLUT and that reduces >> > the size a lot. I tried to separate the package's outputs but I >> > don't know how to do it correctly (I checked the docs but it >> > doesn't go in detail). I'd like to do it but I need some help. >> >> To define a packages with multiple outputs: >> >> - Decide what =E2=80=98outputs=E2=80=99 can be made, eg: =E2=80=98doc= =E2=80=99, =E2=80=98bin=E2=80=99, =E2=80=98examples=E2=80=99, >> etc. In this case, I=E2=80=99d add an =E2=80=98examples=E2=80=99 out= put, to put those >> =E2=80=98freenect-*=E2=80=99 binaries, built from the =E2=80=9Cexamp= les=E2=80=9D directory. >> >> - Add an =E2=80=98outputs=E2=80=99 field, it default to =E2=80=98(list= "out")=E2=80=99, We=E2=80=99d use >> =E2=80=98(outputs '("out" "examples")=E2=80=99. >> >> - Modify the install flags or phases to get files into their output >> directory. Sometimes we can configure the target directory by flags, >> but usually we have to move the files around after the install phase= =E2=80=A6 >> >> You can see =E2=80=98newt=E2=80=99 in =E2=80=98gnu/packages/slang.sc= m=E2=80=99 for a example. > > Great! Thank you. That's more or less what I understood from some code > examples I checked but they were complex and I tried to make the same > thing and didn't work for me. I'll give it a new try with this > example. > > Inputs can also be defined with an extra argument for different outputs, = right? It should be something like: > > `(inputs `("freeglut" ,freeglut "examples")) > > Am I right? Inputs are used (not defined) here, the code you wrote: - Need a freeglut package, which should contain a "examples" output. - In the build environment of this package, a "freeglut" input is available, and its path is store path of the "examples" output of that freeglut package. freeglut's "out" output is not available here. > Nope! > I've been digging and I got this wrong. The third part in the tuple is th= e output of the dependency. > So there's no way to indicate which dependencies are needed for each outp= ut. Yes, the dependencies of outputs are scanned after the build results, not before. This works by searching '/gnu/store' paths in all files from the output's store path. > I also found a flag to compile OpenCV wrappers, which depends on OpenCV. = OpenCV is huge and it's going to be downloaded regardless if its output is = used or not. Best choice here seems to be to separate the package in multip= le sub-packages. If in the same package (multiple outputs), all inputs are needed when build a package, but not all dependencies are needed when install a output by binary substitutes. > I made this with the examples (see below), how does it look? > [...] Will reply to in that email...