guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(operating-system (packages ...)): hack to allow specifying outputs


From: Jan Nieuwenhuizen
Subject: (operating-system (packages ...)): hack to allow specifying outputs
Date: Sun, 06 Mar 2016 13:56:52 +0100

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)))
 
+(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)))))
 
-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]