all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* how to use a variable in a plain-file object?
@ 2024-05-16 15:57 Giovanni Biscuolo
  2024-05-16 16:15 ` raingloom
  2024-05-16 18:39 ` Tomas Volf
  0 siblings, 2 replies; 5+ messages in thread
From: Giovanni Biscuolo @ 2024-05-16 15:57 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 951 bytes --]

Hello,

sorry for the very guile-absolute-beginner question, but I'd like to use
a declared variable in a plain-file object, so I can write something
like in this pseudo-code snippet:

--8<---------------cut here---------------start------------->8---

(define variable1 "var1-value")
(define variable2 "var2-value")

[...]

(define %my-file-object
  ,(plain-file "something.conf" "
# This is an example configuration file

attribute1 =" variable1 " 

attribute2 =" variable2 "

"))

--8<---------------cut here---------------end--------------->8---

and obtain a "something.conf" file like this:

--8<---------------cut here---------------start------------->8---
# This is an example configuration file

attribute1 = var1-value

attribute2 = var2-value

--8<---------------cut here---------------end--------------->8---

how can I do, please?

Thanks, Gio'

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-17  8:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-16 15:57 how to use a variable in a plain-file object? Giovanni Biscuolo
2024-05-16 16:15 ` raingloom
2024-05-17  8:45   ` Giovanni Biscuolo
2024-05-16 18:39 ` Tomas Volf
2024-05-17  8:24   ` Giovanni Biscuolo

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.