From: Jan Nieuwenhuizen <janneke@gnu.org>
To: guix-devel@gnu.org
Subject: (operating-system (packages ...)): hack to allow specifying outputs
Date: Sun, 06 Mar 2016 13:56:52 +0100 [thread overview]
Message-ID: <8737s3ojcb.fsf@drakenvlieg.flower> (raw)
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 <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl
next reply other threads:[~2016-03-06 12:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-06 12:56 Jan Nieuwenhuizen [this message]
2016-03-06 23:12 ` (operating-system (packages ...)): hack to allow specifying outputs Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8737s3ojcb.fsf@drakenvlieg.flower \
--to=janneke@gnu.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.