[Top][All Lists]

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

Re: G-expressions in native-search-paths

From: (
Subject: Re: G-expressions in native-search-paths
Date: Tue, 08 Aug 2023 10:36:13 +0100

Reza Housseini <> writes:
> I am trying to use g-expressions in nativ-search-paths field, but it fails 
> with
> an error message, what is the issue her:
>     (native-search-paths
>      (list (search-path-specification
>           (variable "CFDEM_SRC_DIR")
>           (files #~'((string-append "share/" #$name "-" #$version))))))

There's two issues here:

One, you can't use a gexp in FILES.  This will work fine:

  (files (list (string-append "share/" name "-" version)))

Two, this:

  '(string-append "share/" name "-" version)

does *not* evaluate to what you think it does; in fact, it becomes this:

  (list 'string-append "share/" 'name "-" 'version)

a list of strings and symbols, because it's quoted.  If you want to use
an expression within a quoted form, you can use quasiquote:

  `(,(string-append …))

LIST works fine most of the time, though.

  -- (

reply via email to

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