From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OE6rFISTOWJWRgEAgWs5BA (envelope-from ) for ; Tue, 22 Mar 2022 10:14:44 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id sEA/EYSTOWI/YwEAauVa8A (envelope-from ) for ; Tue, 22 Mar 2022 10:14:44 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 017E4288CC for ; Tue, 22 Mar 2022 10:14:43 +0100 (CET) Received: from localhost ([::1]:37426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWaFe-0000wR-95 for larch@yhetil.org; Tue, 22 Mar 2022 04:52:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWaFQ-0000tb-3M for help-guix@gnu.org; Tue, 22 Mar 2022 04:52:12 -0400 Received: from mout01.posteo.de ([185.67.36.65]:54927) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWaFN-0007V2-Nc for help-guix@gnu.org; Tue, 22 Mar 2022 04:52:11 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CC4BC24002C for ; Tue, 22 Mar 2022 09:52:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1647939127; bh=dXeY+Vzbm9jw1KrP6TnnWnSJdTjBec/QaiCUlETab/k=; h=From:To:Cc:Subject:Date:From; b=AtsdW836dmmrFyt+9H3eBSvW1TrDDcyuUCLjSF5Wdl8DHBf1m7htS0AC85Y0YV8qH M3mJlXh5nNFvDN2GMcbV1/X3a/D8+xQDPH8o6IDN2aRq4htGDcTHAaauf8lnewQBG8 VLPfQ4z12DIvrwuWd/pTWf8+RMRG1yEjc77QGSkpk77wp7aCtwaC1J4ZbyhycgGWw2 2KErtI9awjaiURFSWW1ZKiK/5wj3ucFnDezj8FIRDz8KZ/gcVHLNOEQuTASOkkNcrK l5k0dJspwh3v3C/dEhrqCIB6PS6fL+myknAas+NB2A2Hxkz6tk7+/0EEIbY57u9A7i KHciv0rrUwDTg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4KN4x244jTz9rxF; Tue, 22 Mar 2022 09:52:06 +0100 (CET) References: <87zgljx9yn.fsf@posteo.de> <858439E5-5340-49D8-B1F2-F51DEEF79FDE@tobias.gr> <87v8w6xwri.fsf@posteo.de> <074D2F67-B364-4486-8698-F723F3517CB0@tobias.gr> From: Mekeor Melire To: Tobias Geerinckx-Rice Subject: Re: How to replace %output with #$output? Date: Tue, 22 Mar 2022 08:24:47 +0000 In-reply-to: <074D2F67-B364-4486-8698-F723F3517CB0@tobias.gr> Message-ID: <87r16uxte0.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=mekeor@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1647940484; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=d1BndJv6pn1t7IqlXv1EimwHhOzM45P+uO2vRyDNLrQ=; b=UFvOZKBym3CPlAZd63cx86yuahRdW5xO47ac7k2zk89UFtMu7ynwZ3h0r9qW4gUzF/UWfo ZFa1bDbvrE6icxKrkNtiUIbikRKQSfV6w6jeBmO+jrlLlgXhBH1bSClFMBsGbWe/Ppxloc z27soF5oJU6v2S0+GhDZRlbeQ7R4fXX3s+0sYEt0Eyc1fKwUTCqkXqEzYYnRTMzXwOi9DJ K1R/9DYBG8U59yTq/iwjb2HdPQWVqk/zmyM3in3zwi++UY/zSd+L3bbkWM1dtSnotJnuZD 9VGV1266Q0VXWo36B/0F915sj5mc7XvAFoij1JTQEKLZG+R3lHYI1OU/RkTS3g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647940484; a=rsa-sha256; cv=none; b=NJCeDDZgsK3XrUK5hOLeaV4SYM85aUDxALcTcBctPP/ra6gylheYSbBA6WtoQve6N8NV5p L8S6OsvWN2E6Yffwcx4HNvsEM+fP8aupHL7fjDyVZLbSvEqz+EI6MCBjfSZY2gNcp64Xg6 O3m1bIS9LJ7kwpYgWWF6K30Ru0M6YCOmS3s3h7i+YmrtrcLEWlfOaKoatMT1VityZd7QT8 SFNhS2fKM//p6Yv+h0+CILW8q1LjqiG873R5rMqhU/Mqj9RjX0DjCAbErb4TJXF9S1JvFD V3JbZnCuNzSxIXeqMAfDCzBePd4WlIeqm9ZPew1ZckFgjbK92cyabA/r8WJJRw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.de header.s=2017 header.b=AtsdW836; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.de (policy=none); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 7.59 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.de header.s=2017 header.b=AtsdW836; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.de (policy=none); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 017E4288CC X-Spam-Score: 7.59 X-Migadu-Scanner: scn0.migadu.com X-TUID: r/mHfy89p8uE 2022-03-22 / 07:59 / me@tobias.gr: > On 22 March 2022 07:26:38 UTC, Mekeor Melire wrote: >> (list "CC=gcc") >> >>With these changes I get this error: >> >> Wrong type to apply: "CC=gcc" > > That can happen only if you apply the string as a procedure, i.e. > forgot the the LIST. The `list` was present. As suggested by Feng Shu in another thread, it works like this: --8<---------------cut here---------------start------------->8--- (arguments (list #:tests? #f ; no tests #:make-flags #~(list "CC=gcc") #:phases #~(modify-phases %standard-phases (delete 'configure) (add-after 'unpack 'patch-makefile (lambda _ (substitute* "Makefile" (("/usr/local") #$output))))))) --8<---------------cut here---------------end--------------->8--- It also seems to work with: #:make-flags '(list "CC=gcc") >>> So does hard-coding 'gcc' over using (cc-for-target). >> >>Yes, I would also prefer to use cc-for-target. But I wanted to simplify >>my code first. Because in order to use cc-for-target, I have to use >>backticks. > > Why? Backticks are just short for UNQUOTE. I don't see why you'd need > or even want to use that here. If you insist, you could write: > > `(,(string-append "CC=" (cc-for-target))) > > but I'd much prefer you didn't as I think it's a step back from > > (list (string-append "CC=" (cc-for-target))) Do I have to import cc-for-target from (guix utils)? In case of: ;; do not have (guix utils) imported #:make-flags (list (string-append "CC=" (cc-for-target))) I get this during build: error: cc-for-target: unbound variable In case of: ;; have (guix utils) imported #:make-flags (list (string-append "CC=" (cc-for-target))) I get this error: Wrong type to apply: "CC=gcc" In case of: ;; have (guix utils) imported #:make-flags #~(list (string-append "CC=" (cc-for-target))) I get this error: Unbound variable: cc-for-target In case of: ;; have (guix utils) imported #:make-flags `(list (string-append "CC=" ,(cc-for-target))) I get this error ... Oh, wait, it works! So this is the working code: --8<---------------cut here---------------start------------->8--- (arguments (list #:tests? #f ; no tests #:make-flags `(list (string-append "CC=" ,(cc-for-target))) #:phases #~(modify-phases %standard-phases (delete 'configure) (add-after 'unpack 'patch-makefile (lambda _ (substitute* "Makefile" (("/usr/local") #$output))))))) --8<---------------cut here---------------end--------------->8--- Putting the comma like this also seems to work: #:make-flags `(list (string-append "CC=" ,(cc-for-target))) >>> Very strong opinions on Scheme coding style, that boy. >> >>Please don't assume gender. But yes, you can refer to me with the "he" >>pronoun. > > If you believe yourself to be the son of god, you have problems I > can't help you fix. ;-) I see. Sorry for misunderstanding :-)