help-guix
[Top][All Lists]
Advanced

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

how to use a variable in a plain-file object?


From: Giovanni Biscuolo
Subject: how to use a variable in a plain-file object?
Date: Thu, 16 May 2024 17:57:55 +0200

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: signature.asc
Description: PGP signature


reply via email to

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