From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.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 +FkXKI4Aw2ZuAwAAe85BDQ:P1 (envelope-from ) for ; Mon, 19 Aug 2024 08:21:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id +FkXKI4Aw2ZuAwAAe85BDQ (envelope-from ) for ; Mon, 19 Aug 2024 10:21:34 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=icepic.de header.s=x header.b=cZAdwinn; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1724055694; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=uDSNdIz5yHnevabrJXPpczrh31R5kpbyEtrMFIWbBnk=; b=ETcyU/T2S4DOhGeikOCzaxxCfHEgTDtTAob6eKxP1reZMDOk5tPt6ypo33xL1AxMh5EM59 R0RsozCS28/aXJ6wRNaLJBdPuKKNavwOsVmXL8QODBhHOSOpjdMWyyrNL1UjicnUcrqYCm Pc24Di13s45FnnzXpYNySIPV0sj8Aj4SFw1C2mVAVPB4mRfq1MkizPYlDMojPuLDVLIIbf ntPfmrnDaA8sAnRF1udOhNeWGxfjlmO31AJjoisL3fzGTEIH2kvIPhLRUW+o3Hsjaw4PNH vhqRzr6JTQmv6d0LbSMdT9+YTQz2FkOxZGxjCZY0mQXfkDcD7BMCwFsTQKb+Hg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=icepic.de header.s=x header.b=cZAdwinn; 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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1724055694; a=rsa-sha256; cv=none; b=hZdZdQvt/7k2M6mdIPwGmfA3MMrhpYL/Ma1deFclxhyTqKvaL/qyQQVi6EJ+s5HV64pf5R eavTFCL3Pd/gDFMatkIKkazOgX9jHmwVoP5CbQltbCOAeIptaZl+oMTXTU/9B9pw0iFvI4 7dgglLVN5rMx021r4FL4xssZBcCWJhU01zbUaT86dc0JOHPBl2gA6dpq0Md6m+9gD56leK Qh02n/3KiQeLcOY49EMpNfUG373ZzzFq6Cp7kyAMYkkeUX+nhLLY7mKqYYF9fXyVtGYHIo LXq9xLT1mUrY/hn2T+9lY5y29xrToY5K65la73hQfbZStFA4dPSMJeS5gCKiCQ== 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 8CC6AC549 for ; Mon, 19 Aug 2024 10:21:34 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sfxdE-0002ni-Ot; Mon, 19 Aug 2024 04:20:52 -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 1sfxcX-0002kD-AM for help-guix@gnu.org; Mon, 19 Aug 2024 04:20:09 -0400 Received: from mail-108-mta29.mxroute.com ([136.175.108.29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sfxcV-0001NM-Ey for help-guix@gnu.org; Mon, 19 Aug 2024 04:20:09 -0400 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta29.mxroute.com (ZoneMTA) with ESMTPSA id 19169b8b7a70000a78.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 19 Aug 2024 08:19:59 +0000 X-Zone-Loop: dab5ea4d9afe0713ae7d1eaf9a3f21542585642fb161 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=icepic.de; s=x; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From:Sender: Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=uDSNdIz5yHnevabrJXPpczrh31R5kpbyEtrMFIWbBnk=; b=cZAdwinnAv5wkwJaTgnbQvBQuT CLUMEszIwUcHfhl0/CX/2b6ai1pf/XrIEykYeho8oPzVSOnjE2Ul89NtrXGirfD8k8AlmWQmmxZ7E Novyi//smdd4/Fey2wWoV7fk64C0jgcKKEKj31WDKcvlocHfZoipgq7Bd+W2QGa7jpmnSIcnbxZ5M qOyRWz1+3FDM/pK6lEkcDNZdiyATKw/fMPjXS6+SwWAyUuYUB9Cbd/m6SFAY3Z9zJvIG05BU0+gyp wjrNdLMwL4Ts2iE2bqbVSghe2Zt/0SU3qKmmrykGUN2kV/COtFdTmW3MYzeRAPm2CFz+iCgNmU7gy P/ptxnBQ==; From: Christoph Buck To: help-guix@gnu.org Subject: Apply a patch to a given package definition User-Agent: mu4e 1.12.0; emacs 30.0.50 Date: Mon, 19 Aug 2024 10:19:55 +0200 Message-ID: <87sev0sz4k.fsf@icepic.de> MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: dev@icepic.de Received-SPF: pass client-ip=136.175.108.29; envelope-from=dev@icepic.de; helo=mail-108-mta29.mxroute.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -2.47 X-Migadu-Queue-Id: 8CC6AC549 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -2.47 X-TUID: X+J08ssOPBsD Hi! How do i define a new package which is just a variation of a given package defined in guix? In my concrete example i try to add a new board definition file via a patch to the u-boot bootloader. What i come up with, looks like this: ``` ;; Defines a package ub which will compile u-boot for the ;; `new-cool-board` description file (define ub (make-u-boot-package "new-cool-board" "arm-linux-gnueabihf")) (define-public u-boot-new-cool-board-arm (package (inherit ub) (version "2024.01") (source (origin (patches '("0001-Add-board-description-for-new-cool-board.patch")) (method url-fetch) (uri (string-append "https://ftp.denx.de/pub/u-boot/" "u-boot-" version ".tar.bz2")) (sha256 (base32 "1czmpszalc6b8cj9j7q6cxcy19lnijv3916w3dag6yr3xpqi35mr")))))) ``` I create a u-boot variant for my "new-cool-board" using the build in `make-u-boot-package` function, then i define a new package and inherit from the package variant created with the `make-u-boot-package` function. Then i overwrite `source` entry with an entry which also applies my patch file. This works, however the original u-boot package also apply some patches, which are now lost and must manually added by me again. This seems rather error prone. Is there a better solution? I saw that you can also apply patches via package transformation, but i can't get it to work. I have tried the following: ```test.scm (define u-boot-new-cool-board (make-u-boot-package "new-cool-board" "arm-linux-gnueabihf")) (define transform (options->transformation '((with-patch . "u-boot-new-cool-board=/home/icepic/guix/raspberry/touchscreen/0001-Add-board-description-for-new-cool-board.patch")))) (transform u-boot-new-cool-board) ``` If i now build the test.scm with `guix build -f test.scm --target=arm-linux-gnueabihf -v3 -K` my patch is not applied and the build fails, because there is no target for "new-cool-board". Thanks for your help! -- Best regards Christoph