From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Nieuwenhuizen Subject: (operating-system (packages ...)): hack to allow specifying outputs Date: Sun, 06 Mar 2016 13:56:52 +0100 Message-ID: <8737s3ojcb.fsf@drakenvlieg.flower> 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]:35279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acYFE-0005Sd-Of for guix-devel@gnu.org; Sun, 06 Mar 2016 07:57:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1acYFA-0001cs-LF for guix-devel@gnu.org; Sun, 06 Mar 2016 07:57:12 -0500 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: guix-devel@gnu.org Hi, Is this documentation in gnu/system.scm (packages operating-system-packages ; list of (PACKAGE OUTPUT= ...) (default %base-packages)) ; or just PACKAGE is conveying future intent? I cannot get it to work without the patch below. Obviously, this needs some work...I could do with some help finding the desired scheme meme to map a function with optional arguments. Greetings, Jan diff --git a/gnu/services.scm b/gnu/services.scm index ffba418..81e201c 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -455,10 +455,12 @@ FILES must be a list of name/file-like object pairs." (compose concatenate) (extend append))) =20 +(define (pair?? x) (and (pair? x) x)) + (define (packages->profile-entry packages) "Return a system entry for the profile containing PACKAGES." (mlet %store-monad ((profile (profile-derivation - (manifest (map package->manifest-entry + (manifest (map (lambda (x) (apply package-= >manifest-entry (or (pair?? x) `(,x)))) (delete-duplicates packages= eq?)))))) (return `(("profile" ,profile))))) =20 --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.nl= =20=20