From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?B?5a6L5paH5q2m?= Subject: Re: Optional runtime dependencies in Guix Date: Mon, 12 Jan 2015 21:11:36 +0800 Message-ID: <87vbkcxhx3.fsf@gmail.com> References: <87zjbh3arc.fsf@gnu.org> <87twzwuyn9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAema-0002hO-0D for guix-devel@gnu.org; Mon, 12 Jan 2015 08:11:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YAemV-0007rG-Q0 for guix-devel@gnu.org; Mon, 12 Jan 2015 08:11:47 -0500 In-Reply-To: <87twzwuyn9.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 =?utf-8?Q?Court=C3=A8s?= , Gammel Holte Cc: guix-devel@gnu.org Ludovic Court=C3=A8s writes: > Gammel Holte skribis: > >> For example, consider samtools, a package I use daily and that was recen= tly >> committed to Guix: >> >> http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/bioinformati= cs.scm#n139 >> >> It forces me to install python. In contrast, consider Arch AUR's package: >> >> https://aur.archlinux.org/packages/samtools/ > > From looking at the page above, it seems that it would be feasible to > simply move varfilter.py to a different output. That way, users would > be able to install the default output (which doesn=E2=80=99t depend on Py= thon), > or the =E2=80=9Cpython=E2=80=9D output. Ricardo, WDYT? Move it to a different output should work, but the 'python' output doesn't make much sense to me compare to 'doc', 'bin' and 'debug'. Note that 'python' is not a build dependency of 'samtools', so we can only patch '#!/usr/bin/env' but not 'python' for varfilter.py. Then we should give recommends or suggests, user need it could install python manually. > >> An extreme example of this is weechat: >> >> http://lists.gnu.org/archive/html/guix-devel/2014-09/msg00229.html >> >> Compare with: >> >> https://www.archlinux.org/packages/extra/i686/weechat/ >> >> Guix version forces the user to install all interpreters for running >> user-defined scripts to extend Weechat. These are quite many: lua, perl, >> python, ruby, tcl (and guile). > > Yes, I hadn=E2=80=99t noticed this and I agree this is problematic. > > Kevin, any idea on how to split things? This is total different, those plugins must live in $out/lib/plugins to work (can't move to seperated outputs). Keep in mind that interpreters are both build and runtime dependencies of weechat, the nature way is making them optional when building: (define-public (%weechat #:key (python? #t) (guile? #t) ... (package (inputs `(("python" ,(if python? python #nil)) ("guile" ,(if guile? guile #nil)) ... =20=20=20=20=20=20=20 (define-public weechat (%weechat)) ; our default version Then user can install the customized version with: $ guix package -e '((@ (gnu packages weechat) %weechat) #:python? #f)' > > As I wrote before, there=E2=80=99s no one-size-fits-all recipe to address= the > problem, just a couple of usable patterns (basically separate outputs or > separate packages.) So we need to address this mostly on a case-by-case > basis, and also probably clarify this in the packaging guidelines. > > Thanks, > Ludo=E2=80=99.