How to quote included content in dune file?

I have the following line inside a dune library stanza:

(flags :standard -ccopt (:include flags.txt))

flags.txt is generated by running a shell command, but it’s not in a sexp format.

I would like the inserted content to appear inside quote marks, so that the resulting dune file is valid. Is there a way to do that within dune, without writing a sexp-generating script?

Maybe something like:

(rule (with-stdout-to flags.sexp (echo "\"%{read:flags.txt}\"")))

and then use (:include flags.sexp) instead of (:include flags.txt)?

Cheers,
Nicolas