From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id MGLbHsySxWYWjgAAqHPOHw:P1 (envelope-from ) for ; Wed, 21 Aug 2024 07:10:04 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id MGLbHsySxWYWjgAAqHPOHw (envelope-from ) for ; Wed, 21 Aug 2024 09:10:04 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=marekpasnikowski.pl header.s=dkim header.b="O+JVZfO/"; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=reject) header.from=marekpasnikowski.pl ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1724224204; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=V9vJIDxcv/ojd7wVSNALIOIKMzcCIzeHlCoddxpFWC4=; b=bgF5oIf+OBDe00M/17ETlX+Hc0vcetL09WGuBSgG5rsqd6qsHbr9EkM14A7qwZykGz0z9G yQ3tEhaBp2NSUt/3Eiu3Jjo4kiirEYE5ot35NGL6zcIfvMU2zv0XW6bKpoW+yHv+SqcPn/ 83o4YaBJgF85f0wqWtdoDRo8Jx+kFOnhSJLlgSyfv/Jh4QIR4r42i0BEaJ6XVIyIWH+EP/ QEGbM2WrwqlUDwDo1ia/X/cjP7Oz5V3ixB7VxVUciVYWpk6HKY+WztC00BcABS/9N+hHb5 39PUQ0QRs4iXP8xVQofxmkpZU6iZYZsS5KRsTTqtHYdXpBJwnJdye4ZTw0LF6A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=marekpasnikowski.pl header.s=dkim header.b="O+JVZfO/"; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=reject) header.from=marekpasnikowski.pl ARC-Seal: i=1; s=key1; d=yhetil.org; t=1724224204; a=rsa-sha256; cv=none; b=NfgkIaK988bUJEciMfEwtg73fdyl8pTaPs/zSugNvHcq/wXbQT7RQEd48XFTD29W8o5rGH HDtEfCSLhVeJG1SFVS/Ub72qgzvHiMjhccvUF3nEhAmVDQM/JxhlYHuho0vSH/tkysfgU4 fWyC7Pdhm58cBnZSTpipu179v/TdbMWj/bXZC+emy3t7ySlQtvbL2g0bam6MGah/gVRmHt LZvqBsdeByiUPBSskH27y1DMkSxBmsF7O1R0biaiWVkKQpY0P0sKJnbgFr/cG4SFo3I7n8 TrmLQ9y7dybxHGVLUjm6D1YY6VTQZpu+ESuh2BW/j9D2aOw7JA0mPcGjJRvvgA== 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 F3DABF6E9 for ; Wed, 21 Aug 2024 09:10:03 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgfTD-0007dw-Oa; Wed, 21 Aug 2024 03:09:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sgfTB-0007dg-S2 for guix-devel@gnu.org; Wed, 21 Aug 2024 03:09:26 -0400 Received: from [81.190.248.246] (helo=marekpasnikowski.pl) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sgfT9-0001N7-Ez for guix-devel@gnu.org; Wed, 21 Aug 2024 03:09:25 -0400 Received: from localhost (localhost.local [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 6bb74795 for ; Wed, 21 Aug 2024 07:09:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=marekpasnikowski.pl; h= from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type:content-transfer-encoding; s=dkim; bh=4+ggnmHK3jHo6fgIoRw0zlerUMv58vrBCNmDbPNFeyE=; b=O+JVZfO/NxyV eamP41pQ2dzHP5J3WgRr0DSIe38Q3TKRvR0n2mNc+X5GjOEA7LFiBaHmUtU2g778 Sc+IPHorvHKUSffSv8mt53dsaTeoWzabhcPQnkcHzPjEFiLmpfAKzsTXszV4+R15 vrupNsVtOHiic8AyNFCtDq7cBJwgKiV7vu1hV8RX7YnvF5ioWShozNAsJz1Q+y7R nCFw9X+iuuq3ymnTmIJ5nOhA3PBQgEw7xFJVyPcm4WutZGt0SrvxZkT3RchuT3CA T+henkPH19XvcBpnpinQMoL19YoJYsEBDv997dFxfYuRjFjrAcrZdbXTzhhqYW9Z RnAVofBFLg== Received: by localhost (OpenSMTPD) with ESMTPSA id 9b57130d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Wed, 21 Aug 2024 07:09:16 +0000 (UTC) From: =?utf-8?Q?Marek_Pa=C5=9Bnikowski?= To: guix-devel@gnu.org Subject: Re: Global modification of #:make-flags In-Reply-To: (Sarthak Shah's message of "Tue, 20 Aug 2024 15:59:10 +0530") References: <87jzgbo6hp.fsf@marekpasnikowski.pl> Date: Wed, 21 Aug 2024 09:09:15 +0200 Message-ID: <87h6bel5d0.fsf@marekpasnikowski.pl> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 81.190.248.246 (failed) Received-SPF: pass client-ip=81.190.248.246; envelope-from=marek@marekpasnikowski.pl; helo=marekpasnikowski.pl X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list 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+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -10.01 X-Migadu-Queue-Id: F3DABF6E9 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -10.01 X-TUID: PUy5zuhgthKl Sarthak Shah writes: > Hey Marek, > You might find my work on Parameterized Packages interesting: > > https://blog.lispy.tech/parameterized-packages-the-project-completion-upd= ate.html > > Unfortunately, it hasn't been merged into the main branch yet, however yo= u should be able to make everything use -Os with the > patch. > Thank you. I have read the blog post and the linked second update and I am not sure how should I use it to apply CFLAGS to all the system packages. I really would like to give it a try on my system, but I am struggling with the patch application. I have tried using both a patch and a snippet fields of an origin record, with no success. On the snippet way I have no idea how to transform the (local-file) object representing the patch file into a string to be part of (invoke "patch"). On the patch way, the build process fails with the following error log: ... `File Makefile.am is read-only; trying to patch anyway patching file Makefile.am Hunk #1 FAILED at 17. Hunk #2 succeeded at 117 (offset 3 lines). 1 out of 2 hunks FAILED -- saving rejects to file Makefile.am.rej patching file guix/parameters.scm File guix/transformations.scm is read-only; trying to patch anyway patching file guix/transformations.scm Hunk #1 succeeded at 37 (offset 1 line). Hunk #2 succeeded at 356 (offset 1 line). Hunk #3 succeeded at 983 (offset 19 lines). Hunk #4 succeeded at 1031 (offset 19 lines). File guix/ui.scm is read-only; trying to patch anyway patching file guix/ui.scm Hunk #2 succeeded at 79 (offset 2 lines). Hunk #3 succeeded at 1612 (offset 3 lines). source is at 'guix-1.4.0-24.9a2ddcc-checkout' applying '/gnu/store/wld7aagwmygimf6rqllrmgyp97hrz70v-parameterization.patc= h'... Backtrace: 5 (primitive-load "/gnu/store/7l0mipjghp0f0k4652axgyyg2vi=E2=80= =A6") In ice-9/eval.scm: 619:8 4 (_ #(#(# "gui=E2=80=A6") = #)) In ice-9/boot-9.scm: 142:2 3 (dynamic-wind # =E2=80=A6) In ice-9/eval.scm: 619:8 2 (_ #(#(#))) In srfi/srfi-1.scm: 634:9 1 (for-each # ("/gnu/store/wl=E2=80= =A6")) In guix/build/utils.scm: 812:6 0 (invoke "/gnu/store/210yfax18r2g2inxrml9435ikhfcca6m-p=E2=80= =A6" =E2=80=A6) guix/build/utils.scm:812:6: In procedure invoke: ERROR: 1. &invoke-error: program: "/gnu/store/210yfax18r2g2inxrml9435ikhfcca6m-patch-2.7.6/bin= /patch" arguments: ("--force" "--no-backup-if-mismatch" "-p1" "--input" "/gnu= /store/wld7aagwmygimf6rqllrmgyp97hrz70v-parameterization.patch") exit-status: 1 term-signal: #f stop-signal: #f ... Here is the code I used to attempt the patch, excluding module imports: (define local-files '(find-files ".")) (define guix-source (package-source guix)) ;;; (define make-files-writable `(for-each make-file-writable ,local-files)) (define guix-origin-patches (origin-patches guix-source)) (define guix-parameters-patches (list "suweren/parameterization.patch")) (define patch-guix '(invoke "patch" "--force" "--no-backup-if-mismatch" "-p1" "--input" "suweren/parameterization.patch")) ;;; (define guix-parameters-origin-snippet `(begin ,make-files-writable ,patch-guix #t)) (define guix-parameters-origin-snippet-modules '((guix build utils))) (define guix-parameters-all-patches (append guix-origin-patches guix-parameters-patches)) ;;; (define guix-parameters-origin (origin (inherit guix-source) (sha256 (base32 "0823vl88gbgqadc20in9qvxnrd7zhnq047bfvw4gvdsmgxpcpvpx")) (patches guix-parameters-all-patches) ;; (snippet guix-parameters-origin-snippet) ;; (modules guix-parameters-origin-snippet-modules) )) ;;; (define guix-extra-options (list "--gc-keep-derivations=3Dyes" "--gc-keep-outputs=3Dyes")) (define guix-parameters (package (inherit guix) (source guix-parameters-origin))) ;;; ;; This function is part of a modify-services clause, ;; and it inherits the default guix configuration. (define (guix-options configuration-record) (guix-configuration (inherit configuration-record) (guix guix-parameters) (extra-options guix-extra-options)))