From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fis Trivial Subject: Dealing with language bindings for libraries. Date: Wed, 9 May 2018 15:21:11 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGQu9-0001zL-9h for guix-devel@gnu.org; Wed, 09 May 2018 11:21:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGQu4-00066W-Ae for guix-devel@gnu.org; Wed, 09 May 2018 11:21:21 -0400 Received: from mail-oln040092007107.outbound.protection.outlook.com ([40.92.7.107]:50119 helo=NAM03-CO1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fGQu3-00061V-ML for guix-devel@gnu.org; Wed, 09 May 2018 11:21:16 -0400 Content-Language: en-US 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" To: guix-devel Hi, Guixs. Recently I encountered some libraries that's written in c++ and have multiple language bindings, each of them has their corresponding build system, namely, R, Python, Java. And all the bindings are in tree. During the build process, One would first build the c++ part by cmake, then chdir into each language binding sub-directory and invoke its build system. For packaging them in guix, one way to deal with it is building each binding as an independent package, each package has it's own dependencies for the specific binding and common dependencies for C++ part, that way, we will have N independent packages, for N language binding. But it will result in a huge waste of computing resource. I don't want to waste precious computing time of guix's build farm. Another way to deal with it is supply all dependencies for all language bindings in one package, and then define the build code manually in %standard-phases. But this method comes in two disadvantages. First, we need to re-implement these build process already implemented in (guix build-system) over and over again. For second, those dependencies are burden to users, since no one would actually need all language bindings, they pick the one that's needed. An ideal scenario would be the one that we can specify multiple outputs for one packages, each output corresponds to one language binding, and we can specify different dependencies and build system for each output. Is there any chance we can do that in guix? Thanks.