From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mikhail Kryshen Subject: Re: Problem using multiple manifest files Date: Sat, 13 Oct 2018 22:52:05 +0300 Message-ID: <878t3162vu.fsf@seashell.localdomain> References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBPxh-00060Q-OU for help-guix@gnu.org; Sat, 13 Oct 2018 15:52:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBPxg-0005Y4-NW for help-guix@gnu.org; Sat, 13 Oct 2018 15:52:33 -0400 Received: from mail.kryshen.net ([2a01:6f0:ffff:302::de2b]:43748) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gBPxd-0005S2-3d for help-guix@gnu.org; Sat, 13 Oct 2018 15:52:31 -0400 In-Reply-To: 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: =?utf-8?Q?Thadd=C3=A4us_T=C3=B6ppen?= , help-guix@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thadd=C3=A4us T=C3=B6ppen writes: > Am I correct in assuming, that only one manifest file can be installed at= a > time, thus all package definitions have to be in one file (or at least > imported into a main-package-file)? Yes, but since manifest file is a Guile program, you can implement any custom logic for constructing the manifest there. Here is an example of a manifest file that loads multiple manifests and composes them into one: =2D--------------------------------------------------------------------- (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") =2D--------------------------------------------------------------------- =2D-=20 Mikhail --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCAAdFiEEw6yVFU/UQfkLWikDzxz0c4HWsG4FAlvCTOcACgkQzxz0c4HW sG4OagwAkftUbG8lQJkPTf73nKgBNuG/eQ2A0xQtgybQ3oR2R+WMwIt++02bYQR7 8Vp23nK1oIqfjjYbL/kBHWRtnkSuaMmY1JnfEwBQ15XGHqGZwIF16BD70gXbuMX8 0O0C0kv6VkQusKVFapjjMmZ/QpMh7TVZ8a6vzpgmRdrV9kw8HZ2pOoTacGaGA1rk ZTLfycIJNjkQ1usKbhv+Jcc+BtW1tkZsnAy9ObV2qf/EFglhD1HCSZOisUqaLimF E62c9pavOlNRMHPCa3irWwKwD7Xf2g3tacelAMWEXMzb6pW627KgmevrNkGFbISn Nm5+JUlqwbQ8JZzwVNB4ct6iVn1jETOtZ/gT+PRjyUpGVBoZiqmjaGqSlC1ff/vq AvLrsdfa4gIPhJ10PTy9YyC5PS3JfA2hjTxm2oz6aueHX6oFotiradh1GGTQdJ1K gymnpS25HAepEY4rhjxgwv4YPUfskI+qUISc9FcESUPTHe8jbfnH02k1UguJHVtV 0In1nGEN =pv+S -----END PGP SIGNATURE----- --=-=-=--