From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Building many packages in order Date: Mon, 24 Oct 2016 15:56:43 +0200 Message-ID: References: <5809F448.5030508@crazy-compilers.com> 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]:48461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byfkH-0003Nw-ED for guix-devel@gnu.org; Mon, 24 Oct 2016 09:57:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byfkC-0001WE-IS for guix-devel@gnu.org; Mon, 24 Oct 2016 09:56:57 -0400 Received: from sinope02.bbbm.mdc-berlin.de ([141.80.25.24]:45322) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1byfkC-0001VV-8O for guix-devel@gnu.org; Mon, 24 Oct 2016 09:56:52 -0400 In-Reply-To: <5809F448.5030508@crazy-compilers.com> 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: Hartmut Goebel Cc: guix-devel Hartmut Goebel writes: > Hi, > > testing the new python build system I=E2=80=99m seeking for some way to= build > *many* packages in order. > > Of course I can just run `guix build` with the list of packages to be > build. But when building all python packages, the list gets rather long > and does not fit into one call of `guix build` (due to the number of > arguments xargs passes to the command is restricted). Thus only > partitions of the packages are build in order. > =20 > So I need some way for passing *all* packages to be build to `guix buil= d`. Here=E2=80=99s what I do to rebuild all bioconductor packages: guix build -e '((@@ (gnu packages) fold-packages) (lambda (pkg acc) (if ((@@ (guix import cran) bioconductor-package?) pkg) (cons pkg acc) acc)) (list))' =E2=80=9Cfold-packages=E2=80=9D takes a procedure that accumulates a list= of packages. It takes the current package and the list of accumulated packages so far. Here I=E2=80=99m using =E2=80=9Cbioconductor-package?=E2=80=9D as a= predicate, but you could use something else in its place (e.g. a procedure testing the package name). ~~ Ricardo