gexp: Correctly handle unquoting S-exp objects.
authorMaxime Devos <maximedevos@telenet.be>
Thu, 3 Mar 2022 13:57:03 +0000 (13:57 +0000)
committerLudovic Courtès <ludo@gnu.org>
Sun, 13 Mar 2022 22:18:14 +0000 (23:18 +0100)
commit5aec62ee0f69d691c1c1e322029463beb8bfc3cd
treefa2fa53cac8d5274ac0699b0628186e7e9c67392
parentfce9f13b5417b63a6ba5ae03bd8a2ae82ef0a043
gexp: Correctly handle unquoting S-exp objects.

This fixes a false-positive in the linter:

  guix lint -c 'wrapper-inputs' libaio

* guix/gexp.scm (gexp->approximate-sexp): Allow the 'thing' in <gexp-input> to
  be a sexp, without approximation, by testing if it is a record.
* tests/gexp.scm ("unquoted sexp (not a gexp!)"): Test it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
guix/gexp.scm
tests/gexp.scm