[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
‘file-append’
From: |
Ludovic Courtès |
Subject: |
‘file-append’ |
Date: |
Sat, 10 Sep 2016 14:44:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
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’.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- ‘file-append’,
Ludovic Courtès <=