From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Problem using multiple manifest files Date: Mon, 15 Oct 2018 14:10:48 +0200 Message-ID: <87sh17e7g7.fsf@gnu.org> References: <878t3162vu.fsf@seashell.localdomain> 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]:45434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gC1hy-0000ea-R9 for help-guix@gnu.org; Mon, 15 Oct 2018 08:10:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gC1hy-0004lD-4o for help-guix@gnu.org; Mon, 15 Oct 2018 08:10:50 -0400 In-Reply-To: <878t3162vu.fsf@seashell.localdomain> (Mikhail Kryshen's message of "Sat, 13 Oct 2018 22:52:05 +0300") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Mikhail Kryshen Cc: help-guix@gnu.org Hello, Mikhail Kryshen skribis: > Here is an example of a manifest file that loads multiple manifests and > composes them into one: > > ---------------------------------------------------------------------- > (use-modules (srfi srfi-1) > ((guix ui) #:select (make-user-module))) > > (define (load-manifest file) > ;; Load manifest file in a fresh module with necessary imports. > (let ((module (make-user-module '((guix profiles) (gnu))))) > (save-module-excursion > (lambda _ > (set-current-module module) > (load (canonicalize-path file)))))) > > (define (combined-manifest-from-files . files) > (fold (lambda (file combined) > (manifest-add combined > (manifest-entries (load-manifest file)))) > (manifest '()) > files)) > > (combined-manifest-from-files > "emacs.scm" > "xorg.scm" > "etc.scm") > ---------------------------------------------------------------------- Nice example! Ludo=E2=80=99.