* ‘file-append’
@ 2016-09-10 12:44 Ludovic Courtès
0 siblings, 0 replies; only message in thread
From: Ludovic Courtès @ 2016-09-10 12:44 UTC (permalink / raw)
To: guix-devel
Hello Guix!
As a resolution to <http://bugs.gnu.org/20067>, (guix gexp) provides a
new construct, ‘file-append’, which can be used to express the
concatenation of file name components.
Previously, we would typically write:
#~(string-append #$coreutils "/bin/uname")
which would lead to an sexp like:
(string-append "/gnu/store/…-coreutils-8.25" "/bin/uname")
Now we can still do that, but we can also write:
(file-append coreutils "/bin/uname")
which leads to:
"/gnu/store/…-coreutils-8.25/bin/uname"
This is necessary in some situations, such as that of #20067, and it
saves a little bit of typing and doesn’t cost much. In
9e41130b14ad32c4e1fa756f95d806703056cb60 I converted a bunch of GuixSD
modules to this new style (apologies to those who will experience merge
conflicts ;-)).
Comments welcome!
Ludo’.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-09-10 12:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-10 12:44 ‘file-append’ Ludovic Courtès
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.