From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH] gnu: curl: Add ca-bundle to config. Date: Thu, 5 Jan 2017 16:24:14 +0100 Message-ID: References: <20170104144655.12321-1-ng0@libertad.pw> <20170104144655.12321-2-ng0@libertad.pw> <874m1ezugu.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <871swizsqv.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <8760luoie6.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> <8737gyoi1r.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cP9tx-0008HR-DN for guix-devel@gnu.org; Thu, 05 Jan 2017 10:24:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cP9tu-0002zz-8Q for guix-devel@gnu.org; Thu, 05 Jan 2017 10:24:25 -0500 Received: from sinope02.bbbm.mdc-berlin.de ([141.80.25.24]:51135) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cP9tt-0002zY-Sc for guix-devel@gnu.org; Thu, 05 Jan 2017 10:24:22 -0500 In-Reply-To: <8737gyoi1r.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: ng0 Cc: guix-devel@gnu.org ng0 writes: >> how can I make this valid: >> >> (arguments >> `(#:configure-flags '("--enable-ipv6" "--with-gnutls" "--without-l= ibssh2" >> "--without-libmetalink" "--without-winidn" >> "--without-librtmp" "--without-nghttp2" >> "--without-nss" "--without-cyassl" >> "--without-polarssl" "--without-ssl" >> "--without-winssl" "--without-darwinssl" >> "--disable-sspi" "--disable-ntlm-wb" >> "--disable-ldap" "--disable-rtsp" "--disable= -dict" >> "--disable-telnet" "--disable-tftp" "--disab= le-pop3" >> "--disable-imap" "--disable-smtp" "--disable= -gopher" >> "--disable-file" "--disable-ftp" "--disable-= smb" >> (string-append >> "--with-ca-bundle=3D" >> (string-append (assoc-ref %build-inputs "ns= s-certs") >> "/etc/ssl/certs/ca-certifica= tes.crt"))) >> >> The string-append is not valid here. > > Solved, by using "(list" here. The reason why this didn=E2=80=99t work is because you=E2=80=99re expecti= ng code to be evaluated inside of an =E2=80=9Cinert=E2=80=9D expression. (+ 1 2) is evaluated right away and the result is 3 '(+ 1 2) is a quoted expression, so it=E2=80=99s just a list of '+, 1, an= d 2. Think of the ' as =E2=80=9CDATA MODE=E2=80=9D `(+ 1 2) is a quasiquoted expression. Think of the backtick as a toggle switch. When it=E2=80=99s up it means =E2=80=9CDATA MODE=E2=80=9D, when = it is down (,) it means =E2=80=9CCODE MODE=E2=80=9D. Example: `(+ 1 2 ,(string->number "4")) this means: DATA MODE + 1 2 CODE MODE (string->number "4") so you get a list with the following contents: '+, 1, 2, and the number 4= . Your configure flags above are a quoted list, so everything that follows is just data. =E2=80=9Cstring-append=E2=80=9D is not special, it=E2=80=99= s just another symbol in the list. You can try this in the REPL to convince yourself that this is how quoting works. Note the difference between: `(#:configure-flags '("foo" "bar" (string-append "baz" "lightyear"))) and `(#:configure-flags '("foo" "bar" ,(string-append "baz" "lightyear"))) The comma (=E2=80=9Cunquote=E2=80=9D) flips the toggle switch and the exp= ression is evaluated. Using =E2=80=9Clist=E2=80=9D just means that you are not using quotation = at all. One final note: >> (string-append >> "--with-ca-bundle=3D" >> (string-append (assoc-ref %build-inputs "ns= s-certs") >> "/etc/ssl/certs/ca-certifica= tes.crt"))) That=E2=80=99s really not pretty. You don=E2=80=99t need to nest string-= append expressions. (string-append "this" "and" "that") returns the same value as (string-append "this" (string-append "and" "that")) ~~ Ricardo