From patchwork Tue Nov 28 20:13:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Eure X-Patchwork-Id: 56927 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 61FF027BBEE; Tue, 28 Nov 2023 20:14:31 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3184C27BBE2 for ; Tue, 28 Nov 2023 20:14:26 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r84T2-00089s-IR; Tue, 28 Nov 2023 15:14:00 -0500 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 1r84Sy-00088x-4r for guix-patches@gnu.org; Tue, 28 Nov 2023 15:13:56 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r84Sx-0000ju-Rw for guix-patches@gnu.org; Tue, 28 Nov 2023 15:13:55 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r84T4-0003O3-QJ for guix-patches@gnu.org; Tue, 28 Nov 2023 15:14:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67512] [PATCH 1/5] gnu: icu4c: Update to 73.1. Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Nov 2023 20:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67512 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67512@debbugs.gnu.org Cc: Ian Eure Received: via spool by 67512-submit@debbugs.gnu.org id=B67512.170120243012971 (code B ref 67512); Tue, 28 Nov 2023 20:14:02 +0000 Received: (at 67512) by debbugs.gnu.org; 28 Nov 2023 20:13:50 +0000 Received: from localhost ([127.0.0.1]:47784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r84Sq-0003Mu-Ii for submit@debbugs.gnu.org; Tue, 28 Nov 2023 15:13:50 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:33489) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r84Sl-0003MF-HZ for 67512@debbugs.gnu.org; Tue, 28 Nov 2023 15:13:43 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4CD115C011A; Tue, 28 Nov 2023 15:13:31 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 28 Nov 2023 15:13:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1701202411; x= 1701288811; bh=mWDIOgM1C53qxx17F6v0soa9615bp3pdhpRrq61LvKM=; b=C klm0IUfwrSrBaYYUB7KuIbIPVwoOZnBQuPLCUwt2XMRbknwYxSgHHpvOmHUAfBIM RCsuWNu0uNcnSH56RCHVF9RtQM4m08VpFW9IyxTSQHB9WjHIvbNBFHa9nCcHmhRF 1UzPdkEHr+kIw2o+/b/7QifwTUH2ej8iGosGIohMq37DHXhjHBiF0S0hNSNBYlXA /EvE8lLMv3MycCX7fSmEoO2m+/g2gM6ZgBLEjWrQ9YLdI5nG2BW32pBgkkIfBsUw 48J5K2LuoS+yqdhAFK5Tblyfq5tfp8TFAMOp1KeV987tKqUA2/ZiD8IQMsRGHKB/ +YVkF3eyz92SZWkd9hxHA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1701202411; x= 1701288811; bh=mWDIOgM1C53qxx17F6v0soa9615bp3pdhpRrq61LvKM=; b=p ZghzIUpP6BVf3fsg54Cs+pj2ci/wz8Q1k/3ltxhtSFFNMHjxpAPwbTzYrgxYiWfw ukx5+JnYRkx8vX7746j65IVImlG7M/tJRw12CwIQFiUvfoaXzFaxlflvX00BpiYY Kx9cyvxXd6yx1M9IlSPNjfdfzY4E6wYhCb98jC1rhM6qIZHkzO+J/4Vv/yjPURnV 8G8Q2uxm85leaBEy6tNbARmxZgm/4hiP8+7PN5n6n0PzJq4L+cf0cmnT8Z/cU0QJ W8Fr9SEaTo/T0c1UIzXt6tKuMkRrF5TX1MyLt+A6GacGCnWR+1RzWOFYE1uhRGOy 102KIqgkJAYtToTnLwKiA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeifedgudeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgjfhgggfestd ekredtredttdenucfhrhhomhepkfgrnhcugfhurhgvuceoihgrnhesrhgvthhrohhsphgv tgdrthhvqeenucggtffrrghtthgvrhhnpeevveejffduvdetieeutefgueekvdefieeuvd evleefgefhudelfeetvdfgfeegjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehirghnsehrvghtrhhoshhpvggtrdhtvh X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Nov 2023 15:13:30 -0500 (EST) From: Ian Eure Date: Tue, 28 Nov 2023 12:13:05 -0800 Message-ID: <5ebb1528778467e817b168d3c7bdad3829d1451c.1701186634.git.ian@retrospec.tv> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/icu4c.scm (icu4c): Update to 73.1. Change-Id: I77b8186898494e5b677c2e0c4fb0a234747dbd29 --- gnu/packages/icu4c.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm index 5aaf3a8361..64ae109952 100644 --- a/gnu/packages/icu4c.scm +++ b/gnu/packages/icu4c.scm @@ -45,7 +45,7 @@ (define-module (gnu packages icu4c) (define-public icu4c (package (name "icu4c") - (version "71.1") + (version "73.1") (source (origin (method url-fetch) (uri (string-append @@ -55,7 +55,8 @@ (define-public icu4c (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version) "-src.tgz")) (sha256 - (base32 "1gqywaqj9jmdwrng9lm6inyqmi5j2cz36db9dcqg3yk13zjyd9v7")))) + (base32 + "0iccpdvc0kvpww5a31k9gjkqigyz016i7v80r9zamd34w4fl6mx4")))) (build-system gnu-build-system) (native-inputs (append (list python-minimal) From patchwork Tue Nov 28 20:13:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Eure X-Patchwork-Id: 56929 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8A0C327BBE2; Tue, 28 Nov 2023 20:14:36 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7B1F127BBEA for ; Tue, 28 Nov 2023 20:14:26 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r84T4-0008AE-Mm; Tue, 28 Nov 2023 15:14:02 -0500 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 1r84Sz-00089A-Ry for guix-patches@gnu.org; Tue, 28 Nov 2023 15:13:57 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r84Sy-0000kQ-EG for guix-patches@gnu.org; Tue, 28 Nov 2023 15:13:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r84T5-0003OA-EL for guix-patches@gnu.org; Tue, 28 Nov 2023 15:14:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67512] [PATCH 2/5] gnu: Add icu4c-71. Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Nov 2023 20:14:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67512 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67512@debbugs.gnu.org Cc: Ian Eure Received: via spool by 67512-submit@debbugs.gnu.org id=B67512.170120243412981 (code B ref 67512); Tue, 28 Nov 2023 20:14:03 +0000 Received: (at 67512) by debbugs.gnu.org; 28 Nov 2023 20:13:54 +0000 Received: from localhost ([127.0.0.1]:47786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r84Ss-0003NA-ND for submit@debbugs.gnu.org; Tue, 28 Nov 2023 15:13:54 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:59075) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r84Sm-0003MH-LX for 67512@debbugs.gnu.org; Tue, 28 Nov 2023 15:13:44 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 6D3ED5C025E; Tue, 28 Nov 2023 15:13:32 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 28 Nov 2023 15:13:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1701202412; x= 1701288812; bh=2L9fGLzl+XT0Acil3G2CmJXiHPmMK4e/E0+k7fl+obE=; b=L +Lr0tLFdU2cjkx0gPpglqwjIa7K9sRjRD1D7x+AIbVELP9cLJ6g3cdKtvErtDRNg ob5k2bKsxGOEtk8n1MEVDGXfwlvSiudLqOMAtzDeYTHmitpgqJyGU9PwR1J6sg3j jh4R1+gB1h45sXkA9+rvHD+v4MveqnA9gLZT/KRABAh5GwrJOKRm9wTSVswsqitN 1v5G6ecnl0wqwXNZ6ys7FKsaG0M20j0C1Qo7mQ3dZ1S0KEE+cSz9l0penilbvNah Fd9GwPidj6fmUbP0lEnoG6IUBwz3Fd9tuYGoscDky8EuFhGB1TYqiSYkq9+thisQ 5J8smGDndcbFtn/+nUJUg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1701202412; x= 1701288812; bh=2L9fGLzl+XT0Acil3G2CmJXiHPmMK4e/E0+k7fl+obE=; b=G BR/jTZ3gIspCtvNqUSu4pMCjPV0ufdfRBymMBWAGaO/zx4bjiOkF9DQMiXioaWxI fktYLX1K8q4aPOksGgRG655nsYbsgzFAMtSjjR4TMh4iiAgfyAgV9ypQ8O4Xn3gb 8oQ+znIPsMgyCwoO2s9GjV80sOOI/qZNwscHouHvgpYRSrINLrdSZN/vMZQWWQ7z 5rsTl1tXZIpdDWZXrsrXeun2Wn0k1/YDeb7V8NKD6fsRyERLBTrn9y13whZuSx/E wiUxQauXSpAAoXygjp9N/z9wBFZozpB5JO3PWnmi8/+fi4I3VF5y3sbgAy5Gx8ew 4EJb0nJBih5bXz3lG4jLg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeifedgudeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgjfhgggfestd ekredtredttdenucfhrhhomhepkfgrnhcugfhurhgvuceoihgrnhesrhgvthhrohhsphgv tgdrthhvqeenucggtffrrghtthgvrhhnpeejgedukeefleetjeegtdejveelgfektdeige elvdetheetjeegteeiieekhffgheenucffohhmrghinhepihgtuhdqphhrohhjvggtthdr ohhrghdpghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrthhv X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Nov 2023 15:13:31 -0500 (EST) From: Ian Eure Date: Tue, 28 Nov 2023 12:13:06 -0800 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/icu4c.scm (icu4c-71): New variable. Change-Id: Iaff0df4d6aaa968cdc43f847bd2ced08d0f3a12e --- gnu/packages/icu4c.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm index 64ae109952..376cbac5c6 100644 --- a/gnu/packages/icu4c.scm +++ b/gnu/packages/icu4c.scm @@ -110,6 +110,22 @@ (define-public icu4c (license x11) (home-page "http://site.icu-project.org/"))) +(define-public icu4c-71 + (package + (inherit icu4c) + (name "icu4c") + (version "71.1") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/unicode-org/icu/releases/download/release-" + (string-map (lambda (x) (if (char=? x #\.) #\- x)) version) + "/icu4c-" + (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version) + "-src.tgz")) + (sha256 + (base32 "1gqywaqj9jmdwrng9lm6inyqmi5j2cz36db9dcqg3yk13zjyd9v7")))))) + (define-public icu4c-70 (package (inherit icu4c) From patchwork Tue Nov 28 20:13:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Eure X-Patchwork-Id: 56928 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 877ED27BBEE; Tue, 28 Nov 2023 20:14:34 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8B87127BBE2 for ; Tue, 28 Nov 2023 20:14:33 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r84T6-0008Ag-Eb; Tue, 28 Nov 2023 15:14:06 -0500 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 1r84T1-00089e-79 for guix-patches@gnu.org; Tue, 28 Nov 2023 15:13:59 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r84T0-0000ka-2y for guix-patches@gnu.org; Tue, 28 Nov 2023 15:13:58 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r84T5-0003OI-V5 for guix-patches@gnu.org; Tue, 28 Nov 2023 15:14:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67512] [PATCH 3/5] gnu: node: Switch to icu4c-71. Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Nov 2023 20:14:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67512 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67512@debbugs.gnu.org Cc: Ian Eure Received: via spool by 67512-submit@debbugs.gnu.org id=B67512.170120244213018 (code B ref 67512); Tue, 28 Nov 2023 20:14:03 +0000 Received: (at 67512) by debbugs.gnu.org; 28 Nov 2023 20:14:02 +0000 Received: from localhost ([127.0.0.1]:47788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r84Sw-0003NK-4J for submit@debbugs.gnu.org; Tue, 28 Nov 2023 15:14:02 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:34257) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r84Sn-0003MJ-OC for 67512@debbugs.gnu.org; Tue, 28 Nov 2023 15:13:46 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 78CB55C0245; Tue, 28 Nov 2023 15:13:33 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 28 Nov 2023 15:13:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1701202413; x= 1701288813; bh=9bCeScb0nTG+ahqUiR03jJDlvtqYrHOMchSxHi0S/Ok=; b=N tbCHnCKbaRJjHqGQJz3VklvF5rQ8Cbt99Mj+1cWVCPQT1bAK4zxXnFW0n5tmd+Af kLE3T26C2vCVqQMQHJc/biGZtXU6imiMjo1NpcvKoLI4+FFcpezHxtoR5s1r9oqk PUt4mTT/Nbh3YQE96GN0BG6E2iLO03HuEGHSOP+tHLu76JmV1cVTfs+nmgHqfS3+ joN/nn3Ff5sfnLmMtVrnpoWTqltB1sPK7RLDyYAnc8aKFRitW6fuJMJT368qa3Cp iHSKOBPmVO+ThekykhwcO1kwqXDrNvrhZgQT4Yzh8CnC14Br+qqeyLN6US+qn6Jx LgF/z0/gorZzeW7bySwtQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1701202413; x= 1701288813; bh=9bCeScb0nTG+ahqUiR03jJDlvtqYrHOMchSxHi0S/Ok=; b=t 4uFD50DtElmjwfNo/T6hAvpxdSv38rKzmslX5f1YCPF5KcENSmjBjaa8MdJSX+qI RCOT4xST+0rHaGdQyVxj8MBKMcuSCtD9iDDUyWkhD/QW8c7x7Zeq0PSbYl6hyU/w ayyhX+/SkYCQEmmapsIqXGsGMYhY25yk9Gb74tSqDXe6uBkBChlcvxMI00e5mQhC dkltstxim49VHnIbcfy/Km4/sH4GhMD6RYiIMagIplwgves7UdRxKlzBsS1xg7cP BwJWsrlmrChk//7No42UzUYPK5z/1W9Ue5Oy7AffvZ2Zw+PLEruy1dWqp3/i7PWb vdMb7DQi2T+3YkbqedwuQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeifedgudeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgjfhgggfestd ekredtredttdenucfhrhhomhepkfgrnhcugfhurhgvuceoihgrnhesrhgvthhrohhsphgv tgdrthhvqeenucggtffrrghtthgvrhhnpeevveejffduvdetieeutefgueekvdefieeuvd evleefgefhudelfeetvdfgfeegjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehirghnsehrvghtrhhoshhpvggtrdhtvh X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Nov 2023 15:13:32 -0500 (EST) From: Ian Eure Date: Tue, 28 Nov 2023 12:13:07 -0800 Message-ID: <962283668728cbee1d762202f07c4923394a6115.1701186634.git.ian@retrospec.tv> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node.scm (node): Switch to icu4c-71. I encountered consistent test failures with icu4c 73.1. Change-Id: Iaad9a4f274f9e3b8736486b58f262a82304b0b5d --- gnu/packages/node.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 6e30ad486a..668847405d 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -290,7 +290,7 @@ (define-public node ;; Runtime dependencies for binaries used as a bootstrap. (list c-ares http-parser - icu4c + icu4c-71 libuv-for-node `(,nghttp2-for-node "lib") openssl-1.1 @@ -310,7 +310,7 @@ (define-public node coreutils c-ares http-parser - icu4c + icu4c-71 libuv-for-node `(,nghttp2-for-node "lib") openssl From patchwork Tue Nov 28 20:13:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ian Eure X-Patchwork-Id: 56930 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C713127BBEC; Tue, 28 Nov 2023 20:15:20 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id F225827BBE2 for ; Tue, 28 Nov 2023 20:15:18 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r84Tz-0008Rx-25; Tue, 28 Nov 2023 15:14:59 -0500 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 1r84Tw-0008RB-B1 for guix-patches@gnu.org; Tue, 28 Nov 2023 15:14:57 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r84Tw-00012f-1x for guix-patches@gnu.org; Tue, 28 Nov 2023 15:14:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r84U3-0003QL-2o for guix-patches@gnu.org; Tue, 28 Nov 2023 15:15:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67512] [PATCH 4/5] gnu: Add wasm packages. Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Nov 2023 20:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67512 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67512@debbugs.gnu.org Cc: Ian Eure Received: via spool by 67512-submit@debbugs.gnu.org id=B67512.170120245313077 (code B ref 67512); Tue, 28 Nov 2023 20:15:03 +0000 Received: (at 67512) by debbugs.gnu.org; 28 Nov 2023 20:14:13 +0000 Received: from localhost ([127.0.0.1]:47796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r84T7-0003OP-8L for submit@debbugs.gnu.org; Tue, 28 Nov 2023 15:14:13 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:35609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r84So-0003ML-Pv for 67512@debbugs.gnu.org; Tue, 28 Nov 2023 15:13:50 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8CC505C021C; Tue, 28 Nov 2023 15:13:34 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 28 Nov 2023 15:13:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1701202414; x=1701288814; bh=KBZlLCWoEJhX66/2Huvzkjyb3iA4+CL1lxU j6gOtgbc=; b=emGztUQKYrU+bxppW8Bu8rXrj8hO5eQRCLnDUzAnvV9w/V8png9 u2wnGlYAZSdaKBsY+6akbb7+2p2+FrExBvzCo8RbuG2b8Nx86hKh+X/Moy82NWQB aswhVDkLYGeqPMn5Ds+nFJihJwYYapxJdU5ojDqRn2RLZLlFlPt83233dvOtkKM6 cVrmwyjUTKgfiR2bMJDr/JzSs4gRGa1gb2aWHYFjVR0LGEWnb6W/HiGcnjUZ2vww ix/NpBJ6N4HUh0VCSx4Kkevg0U61t0QZIWZdW/GMN+jcErUWGNAOmzYAv4Bj56FU RbC3FyvFkZdeFltVUZ5d/J1vDKeX+keXM3w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1701202414; x=1701288814; bh=KBZlLCWoEJhX66/2Huvzkjyb3iA4+CL1lxU j6gOtgbc=; b=ul/u995HXfxxbVOzg1qeQrY2kaAomgVoqvMAS85/cGb4FFJCJaK Tzwe2ZF1Qht723CImkzS0dgKDljRQV+BdskzzpKr8cvS94MtxJQLJjlExmxYrQPi pNheSKVfVzR5wKE03qLUJUi1KOd9VkVzaxrH4XGCommDnVseY4qCea/EBs9BV+8G cekxl82G7ea7f2HeDh5xcgHw43srE4abSpLtV3dZUBca4JFyDU0KiFBS+6JZev2X KRCHETPkIMJxO4AHMcloyAEhhVw7lZQqs3UUEX2Q2+LYq7x2LHdXkH6CNTp7r7SL rY45d63TzFbY6Rc2S09nIF/RFyMzrwWhOrg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeifedgudeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgjfhggtgfgse htkeertdertdejnecuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhp vggtrdhtvheqnecuggftrfgrthhtvghrnhepudejffefudeluedvheeuhedtvefgkefgte evgeeljeelfeejhfdtveehvedtkeefnecuffhomhgrihhnpehgnhhurdhorhhgpdhgihht hhhusgdrtghomhdpmhhoiihilhhlrgdrohhrghdpfigrshhirdguvghvpdhllhhvmhdroh hrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehi rghnsehrvghtrhhoshhpvggtrdhtvh X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Nov 2023 15:13:33 -0500 (EST) From: Ian Eure Date: Tue, 28 Nov 2023 12:13:08 -0800 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/wasm.scm (wasi-libc): New variable. * gnu/packages/wasm.scm (wasm32-wasi-clang-runtime): New variable. * gnu/packages/wasm.scm (wasm32-wasi-clang): New variable. * gnu/packages/wasm.scm (wasm32-wasi-libcxx): New variable. * gnu/packages/wasm.scm (wasm32-wasi-clang-toolchain): New variable. Change-Id: I546cb6b7450b760379fb8c3043e48ffc5e714c68 --- gnu/packages/wasm.scm | 273 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 273 insertions(+) create mode 100644 gnu/packages/wasm.scm diff --git a/gnu/packages/wasm.scm b/gnu/packages/wasm.scm new file mode 100644 index 0000000000..05d247f333 --- /dev/null +++ b/gnu/packages/wasm.scm @@ -0,0 +1,273 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022-2023 Pierre Langlois +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages wasm) + #:use-module (guix base32) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix utils) + #:use-module (guix git-download) + #:use-module (guix build-system cmake) + #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) + #:use-module (gnu packages bash) + #:use-module (gnu packages llvm) + #:use-module (gnu packages python)) + +(define-public wasi-libc + (package + (name "wasi-libc") + (version "sdk-19") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/WebAssembly/wasi-libc") + (commit (string-append "wasi-" version)) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0bnpz8wk9wiic938296gxp4vz820bvpi1w41jksjzz5552hql169")))) + (build-system gnu-build-system) + (native-inputs (list clang-15)) + (arguments + (list + #:tests? #f ;No test suite + ;; Firefox uses wasm2c to compile WebAssembly to C code, and it + ;; does not support the memory.copy opcode. + ;; See https://bugzilla.mozilla.org/show_bug.cgi?id=1773200#c4 + #:make-flags ''("BULK_MEMORY_SOURCES=") + #:phases #~(modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'set-sysroot-include + (lambda _ + (setenv "C_INCLUDE_PATH" + (string-append (getcwd) "/sysroot/include")))) + (add-before 'install 'set-install-dir + (lambda _ + (setenv "INSTALL_DIR" + (string-append #$output "/wasm32-wasi"))))))) + (home-page "https://wasi.dev") + (synopsis "WASI libc implementation for WebAssembly") + (description + "WASI Libc is a libc for WebAssembly programs built on top of WASI +system calls. It provides a wide array of POSIX-compatible C APIs, including +support for standard I/O, file I/O, filesystem manipulation, memory +management, time, string, environment variables, program startup, and many +other APIs.") + (license (list + ;; For wasi-libc, with LLVM exceptions + license:asl2.0 + ;; For malloc.c. + license:cc0 + ;; For cloudlibc. + license:bsd-2 + ;; For wasi-libc and musl-libc. + license:expat)))) + +(define-public wasm32-wasi-clang-runtime + (package (inherit clang-runtime-15) + (native-inputs + (list clang-15 + wasi-libc)) + (inputs (list llvm-15)) + (arguments + (list + #:build-type "Release" + #:tests? #f + ;; Stripping binaries breaks wasm linking, resulting in the following + ;; error: "archive has no index; run ranlib to add one". + #:strip-binaries? #f + #:configure-flags + #~(list "-DCMAKE_C_COMPILER=clang" + "-DCMAKE_C_COMPILER_TARGET=wasm32-wasi" + (string-append + "-DCMAKE_SYSROOT=" #$wasi-libc "/wasm32-wasi") + (string-append + "-DCMAKE_C_FLAGS=-I " #$wasi-libc "/wasm32-wasi/include") + + "-DCOMPILER_RT_OS_DIR=wasi" + + "-DCOMPILER_RT_BAREMETAL_BUILD=On" + "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=On" + + ;; WASM only needs libclang_rt.builtins-wasm32.a from + ;; compiler-rt. + "../source/compiler-rt/lib/builtins"))))) + +;; FIXME: Ideally we wouldn't need to build a separate compiler because clang +;; can support multiple targets at runtime. However Guix patches the default +;; clang with a specific clang-runtime package. It would be good to improve +;; upstream Guix's support for cross-compiling with clang. + +(define clang-from-llvm (@@ (gnu packages llvm) clang-from-llvm)) +(define llvm-monorepo (@@ (gnu packages llvm) llvm-monorepo)) + +(define-public wasm32-wasi-clang + (let ((base (clang-from-llvm llvm-15 wasm32-wasi-clang-runtime))) + (package + (inherit base) + (name "wasm32-wasi-clang") + (inputs (modify-inputs (package-inputs base) + (prepend wasi-libc))) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:configure-flags flags) + #~(list "-DCLANG_INCLUDE_TESTS=True" + ;; Use a sane default include directory. + (string-append "-DC_INCLUDE_DIRS=" + #$wasi-libc "/wasm32-wasi/include"))) + ((#:phases phases) + `(modify-phases ,phases + (delete 'symlink-cfi_ignorelist)))))))) + +(define-public wasm32-wasi-libcxx + (package + (name "wasm32-wasi-libcxx") + (version (package-version llvm-15)) + (source + (llvm-monorepo version)) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags #~(list (string-append "-S ../source/runtimes") + + "-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi" + + (string-append "-DCMAKE_SYSROOT=" + #$wasi-libc "/wasm32-wasi") + + (string-append "-DCMAKE_INCLUDE_PATH=" + #$wasi-libc + "/wasm32-wasi/include") + + (string-append "-DCMAKE_STAGING_PREFIX=" + #$output "/wasm32-wasi") + + "-DCMAKE_C_COMPILER=clang" + "-DCMAKE_C_COMPILER_WORKS=ON" + "-DCMAKE_CXX_COMPILER=clang++" + "-DCMAKE_CXX_COMPILER_WORKS=ON" + "-DCMAKE_C_COMPILER_TARGET=wasm32-wasi" + "-DCMAKE_CXX_COMPILER_TARGET=wasm32-wasi" + + "-DLIBCXX_LIBDIR_SUFFIX=/wasm32-wasi" + + "-DLIBCXX_ENABLE_EXCEPTIONS=OFF" + "-DLIBCXX_ENABLE_SHARED=OFF" + "-DLIBCXX_ENABLE_THREADS=OFF" + "-DLIBCXX_ENABLE_FILESYSTEM=OFF" + + "-DLIBCXXABI_LIBDIR_SUFFIX=/wasm32-wasi" + + "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF" + "-DLIBCXXABI_ENABLE_SHARED=OFF" + "-DLIBCXXABI_ENABLE_THREADS=OFF" + "-DLIBCXXABI_ENABLE_FILESYSTEM=OFF") + #:tests? #f + #:phases #~(modify-phases %standard-phases + (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH + (lambda _ + (setenv "CPLUS_INCLUDE_PATH" + (string-append #$wasi-libc + "/wasm32-wasi/include:" + (getenv "CPLUS_INCLUDE_PATH")))))))) + (native-inputs (list lld python wasm32-wasi-clang)) + (inputs (list wasi-libc)) + (home-page "https://libcxx.llvm.org") + (synopsis "C++ standard library for WebAssembly") + (description + "This package provides an implementation of the C++ standard library for +use with Clang, targeting C++11, C++14 and above. This package targets +WebAssembly with WASI.") + (license license:expat))) + +(define-public wasm32-wasi-clang-toolchain + (package + (name "wasm32-wasi-clang-toolchain") + (version (package-version wasm32-wasi-clang)) + (source + #f) + (build-system trivial-build-system) + (arguments + (list + #:builder (with-imported-modules '((guix build union) + (guix build utils)) + #~(begin + (use-modules (guix build union) + (guix build utils)) + (union-build #$output + (list #$wasm32-wasi-clang-runtime + #$wasi-libc + #$wasm32-wasi-libcxx)) + (mkdir-p (string-append #$output + "/bin")) + + ;; We provide clang and clang++ via a wrapped program that sets + ;; include paths correctly so that it does not include paths from + ;; the host. + + ;; FIXME: Review how we can provide better support for + ;; cross-compiling with clang in Guix, maybe adding support for + ;; the CROSS_C_INCLUDE_PATH and CROSS_CPLUS_INCLUDE_PATH + ;; environment variables like GCC. + + (for-each (lambda (bin) + (symlink (string-append #$wasm32-wasi-clang + bin) + (string-append #$output + bin)) + (wrap-program (string-append #$output + bin) + #:sh (string-append #$bash-minimal + "/bin/bash") + `("C_INCLUDE_PATH" + ":" = + (,(string-append #$output + "/wasm32-wasi/include"))) + `("CPLUS_INCLUDE_PATH" + ":" = + ;; Make sure inclure/c++/v1 comes first for #include_next + ;; to work. + (,(string-append #$output + "/wasm32-wasi/include/c++/v1") , + (string-append #$output + "/wasm32-wasi/include"))))) + '("/bin/clang" + "/bin/clang++")) + + (symlink (string-append #$lld + "/bin/wasm-ld") + (string-append #$output + "/bin/wasm-ld")))))) + (inputs (list bash-minimal + lld + wasi-libc + wasm32-wasi-clang + wasm32-wasi-clang-runtime + wasm32-wasi-libcxx)) + (license (cons (package-license wasm32-wasi-clang) + (package-license wasi-libc))) + (home-page "https://clang.llvm.org") + (synopsis + "Complete Clang toolchain for C/C++ development, for WebAssembly.") + (description + "This package provides a complete Clang toolchain for C/C++ +development targeting WebAssembly with WASI. This includes Clang, as well as +libc, libc++ and wasm-ld."))) From patchwork Tue Nov 28 20:13:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ian Eure X-Patchwork-Id: 56931 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 56A1C27BBE2; Tue, 28 Nov 2023 20:15:25 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E3B4E27BBEA for ; Tue, 28 Nov 2023 20:15:19 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r84Tz-0008S1-Cj; Tue, 28 Nov 2023 15:14:59 -0500 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 1r84Tw-0008RA-4R for guix-patches@gnu.org; Tue, 28 Nov 2023 15:14:56 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r84Tv-00012X-IU for guix-patches@gnu.org; Tue, 28 Nov 2023 15:14:55 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r84U2-0003QC-Iz for guix-patches@gnu.org; Tue, 28 Nov 2023 15:15:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67512] [PATCH 5/5] gnu: Add librewolf. Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Nov 2023 20:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67512 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67512@debbugs.gnu.org Cc: Ian Eure Received: via spool by 67512-submit@debbugs.gnu.org id=B67512.170120244413048 (code B ref 67512); Tue, 28 Nov 2023 20:15:02 +0000 Received: (at 67512) by debbugs.gnu.org; 28 Nov 2023 20:14:04 +0000 Received: from localhost ([127.0.0.1]:47791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r84T4-0003Nv-4J for submit@debbugs.gnu.org; Tue, 28 Nov 2023 15:14:04 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:49057) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r84Sq-0003MS-5f for 67512@debbugs.gnu.org; Tue, 28 Nov 2023 15:13:50 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C52A75C02B6; Tue, 28 Nov 2023 15:13:35 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 28 Nov 2023 15:13:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1701202415; x=1701288815; bh=2dtbkvEb3dYM0vlLhXAiAdusTZqBJTKpGHy GdWGVYZw=; b=PSQmtvZEXlXRH3iAyxfHKj5FV36WejAbOz+FHrtHbV+K2eDjB7v Lq5OQuqQjM5G2YUSd9ctMeLE4DBLvAgxzQgVJQDBjkrpWXjjuam8UMwviajbcIkJ vMopgis0ZW/VLRDM1oD8rVco5EbnvVgZOxnRleFCNblTkQNS+mCOySn9r6Ch8RnW sr9NLqVAYhcTQ8w4+EQLou7GtD+MBHvvCrQ5i32KrWIY1G/NlbbwN/B8IVvsnOT5 /fvEktNqwgzp7hfXj17yGhORlUfpPzzC4FOv7xoBuEFrP6uO7S3rNlhWP23c9cg7 2wGFlJ2JJ9+rD1Q+lRxLAz9eh0aaoTRZgkQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1701202415; x=1701288815; bh=2dtbkvEb3dYM0vlLhXAiAdusTZqBJTKpGHy GdWGVYZw=; b=z7jdqvlYHPOPEFSDu8lxhpEUOa0Qqv1+B3w+VEEVw21MWoQhBOq aj4K8GvY69KtU88D9Xqtoe8DGWfVUP8g4VpeLZPPDwMIkx0bg9iyA/nmtKryruly pNyqNfysF0VFNlxHRzixum+3GeZieB7bxZzCU13K30KEaqhH1hQbyChfFrkgklbH zJNorPt+ihMtKiy/Q7PWbSr0+/KRmCLp1iXw11njMB384fWbzZVGfC3S8FxYsLlK g8ICWgsd5SLNbVSW22HIc1Io2W0PzoZRLbMwBPgiyC6mECOehvK0gGDMqu8KWeys n7V/TYVhQf13uOak3j4f2ukI1eCwZjQJVwQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeifedgudeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgjfhggtgfgse htkeertdertdejnecuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhp vggtrdhtvheqnecuggftrfgrthhtvghrnhepteetkeekgfeffeejudekteeigeejffekhf duheeileeitedvjeeiieeuffdvtdfhnecuffhomhgrihhnpehgnhhurdhorhhgpdhsvggr rhgthhhfohigrdhorhhgpdhgihhtlhgrsgdrtghomhdptghonhhtvghnthdrrhgvrggupd hmohiiihhllhgrrdhorhhgpdhgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehirghnsehrvghtrhhoshhpvggtrdhtvh X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Nov 2023 15:13:34 -0500 (EST) From: Ian Eure Date: Tue, 28 Nov 2023 12:13:09 -0800 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/librewolf.scm (librewolf): New variable. Change-Id: Iea4dcf45bfaff118d1d9d6e871c4a4ff3e68a3b3 --- gnu/packages/librewolf.scm | 560 +++++++++++++++++++++++++++++++++++++ 1 file changed, 560 insertions(+) create mode 100644 gnu/packages/librewolf.scm diff --git a/gnu/packages/librewolf.scm b/gnu/packages/librewolf.scm new file mode 100644 index 0000000000..b1e890e518 --- /dev/null +++ b/gnu/packages/librewolf.scm @@ -0,0 +1,560 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013, 2015 Andreas Enge +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès +;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Mark H Weaver +;;; Copyright © 2015 Sou Bunnbu +;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner +;;; Copyright © 2016 Alex Griffin +;;; Copyright © 2017 Clément Lassieur +;;; Copyright © 2017, 2018 Nikita +;;; Copyright © 2017, 2018 ng0 +;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice +;;; Copyright © 2018, 2020, 2022 Ricardo Wurmus +;;; Copyright © 2019 Ivan Petkov +;;; Copyright © 2020 Oleg Pykhalov +;;; Copyright © 2020 Jakub Kądziołka +;;; Copyright © 2019, 2020 Adrian Malacoda +;;; Copyright © 2020-2023 Jonathan Brielmaier +;;; Copyright © 2020 Zhu Zihao +;;; Copyright © 2021 pineapples +;;; Copyright © 2021 Brice Waegeneire +;;; Copyright © 2021, 2022, 2023 John Kehayias +;;; Copyright © 2022 Pierre Langlois +;;; Copyright © 2023 Tomas Volf +;;; Copyright © 2023 Ian Eure +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + + +(define-module (gnu packages librewolf) + #:use-module (guix build-system gnu) + #:use-module (guix build-system cargo) + #:use-module (guix build-system trivial) + #:use-module (guix download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix utils) + #:use-module ((guix build utils) #:select (alist-replace)) + + #:use-module (gnu packages) + #:use-module (gnu packages assembly) + #:use-module (gnu packages autotools) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) + #:use-module (gnu packages compression) + #:use-module (gnu packages crates-io) + #:use-module (gnu packages cups) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages gl) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages gtk) + #:use-module (gnu packages hunspell) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages image) + #:use-module (gnu packages jemalloc) + #:use-module (gnu packages kerberos) + #:use-module (gnu packages libcanberra) + #:use-module (gnu packages libevent) + #:use-module (gnu packages libffi) + #:use-module (gnu packages linux) + #:use-module (gnu packages llvm) + #:use-module (gnu packages m4) + #:use-module (gnu packages node) + #:use-module (gnu packages nss) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages python) + #:use-module (gnu packages rust) + #:use-module (gnu packages rust-apps) + #:use-module (gnu packages speech) + #:use-module (gnu packages sqlite) + #:use-module (gnu packages video) + #:use-module (gnu packages wasm) + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages xorg)) + +;; Define the versions of rust needed to build firefox, trying to match +;; upstream. See the file taskcluster/ci/toolchain/rust.yml at +;; https://searchfox.org under the particular firefox release, like +;; mozilla-esr102. +(define rust-librewolf rust) ; 1.60 is the default in Guix, 1.65 is the minimum. + +;; Update this id with every firefox update to its release date. +;; It's used for cache validation and therefore can lead to strange bugs. +(define %librewolf-build-id "20231120132923") + +(define-public librewolf + (package + (name "librewolf") + (version "120.0-2") + (source + (origin + (method url-fetch) + + (uri (string-append + "https://gitlab.com/api/v4/projects/32320088/packages/generic/librewolf-source/" + version "/librewolf-" version ".source.tar.gz")) + (sha256 + (base32 "17yiw4pql9pf2qgk5a6xjqjjbgplla7fflrw1ldgd07rzsjlvj4n")))) + (build-system gnu-build-system) + (arguments + (list + #:configure-flags #~(let ((clang #$(this-package-native-input "clang")) + (wasi-sysroot #$(this-package-native-input + "wasm32-wasi-clang-toolchain"))) + `("--enable-application=browser" + + ;; Configuration + "--with-system-jpeg" + "--with-system-zlib" + ;; "--with-system-png" ;require libpng-apng >= 1.6.35 + "--with-system-icu" + "--enable-system-ffi" + "--enable-system-pixman" + "--enable-jemalloc" + + ;; see https://bugs.gnu.org/32833 + "--with-system-nspr" + ;; "--with-system-nss" + + ,(string-append "--with-clang-path=" clang + "/bin/clang") + ,(string-append "--with-libclang-path=" clang + "/lib") + ,(string-append "--with-wasi-sysroot=" + wasi-sysroot "/wasm32-wasi") + + ;; Distribution + "--with-distribution-id=org.nonguix" + "--disable-official-branding" + "--with-app-name=librewolf" + "--with-app-basename=LibreWolf" + "--with-branding=browser/branding/librewolf" + + ;; Features + "--disable-tests" + "--disable-updater" + "--enable-pulseaudio" + "--disable-crashreporter" + "--allow-addon-sideload" + "--with-unsigned-addon-scopes=app,system" + + ;; Build details + "--disable-debug" + "--enable-rust-simd" + "--enable-release" + "--enable-optimize" + "--enable-strip" + "--enable-hardening" + "--disable-elf-hack")) + #:imported-modules %cargo-utils-modules + #:modules `((ice-9 regex) + (ice-9 string-fun) + (ice-9 ftw) + (srfi srfi-1) + (srfi srfi-26) + (rnrs bytevectors) + (rnrs io ports) + (guix elf) + (guix build gremlin) + ,@%gnu-build-system-modules) + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'fix-preferences + (lambda* (#:key inputs #:allow-other-keys) + (let ((port (open-file "browser/app/profile/firefox.js" + "a"))) + (define (write-setting key value) + (format port "~%pref(\"~a\", ~a);~%" key value) + (format #t + "fix-preferences: setting value of ~a to ~a~%" key + value)) + + ;; We should allow Firefox sandbox to read the store directory, + ;; because Firefox sandbox have access to /usr on FHS distros. + (write-setting + "security.sandbox.content.read_path_whitelist" + (string-append "\"" + (%store-directory) "/\"")) + + ;; XDG settings should be managed by Guix. + (write-setting "browser.shell.checkDefaultBrowser" + "false") + (close-port port)))) + (add-after 'fix-preferences 'fix-ffmpeg-runtime-linker + (lambda* (#:key inputs #:allow-other-keys) + (let* ((ffmpeg (assoc-ref inputs "ffmpeg")) + (libavcodec (string-append ffmpeg + "/lib/libavcodec.so"))) + ;; Arrange to load libavcodec.so by its absolute file name. + (substitute* "dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp" + (("libavcodec\\.so") + libavcodec))))) + (add-after 'patch-source-shebangs 'patch-cargo-checksums + (lambda _ + (use-modules (guix build cargo-utils)) + (let ((null-hash + ;; This is the SHA256 output of an empty string. + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")) + (for-each (lambda (file) + (format #t + "patch-cargo-checksums: patching checksums in ~a~%" + file) + (substitute* file + (("(checksum = )\".*\"" all name) + (string-append name "\"" null-hash + "\"")))) + (find-files "." "Cargo\\.lock$")) + (for-each generate-all-checksums + '("build" "dom/media" + "dom/webauthn" + "gfx" + "intl" + "js" + "media" + "modules" + "mozglue/static/rust" + "netwerk" + "remote" + "security/manager/ssl" + "servo" + "storage" + "third_party/rust" + "toolkit" + "xpcom/rust" + "services"))))) + (add-after 'patch-cargo-checksums 'remove-cargo-frozen-flag + (lambda _ + ;; Remove --frozen flag from cargo invokation, otherwise it'll + ;; complain that it's not able to change Cargo.lock. + ;; https://bugzilla.mozilla.org/show_bug.cgi?id=1726373 + (substitute* "build/RunCbindgen.py" + (("\"--frozen\",") + "")))) + (delete 'bootstrap) + (add-before 'configure 'patch-SpeechDispatcherService.cpp + (lambda _ + (let* ((lib "libspeechd.so.2") + (file + "dom/media/webspeech/synth/speechd/SpeechDispatcherService.cpp") + (old-content (call-with-input-file file + get-string-all))) + (substitute file + `((,(format #f "~s" lib) unquote + (λ (line _) + (string-replace-substring line lib + (string-append #$speech-dispatcher + "/lib/" + lib)))))) + (if (string=? old-content + (call-with-input-file file + get-string-all)) + (error + "substitute did nothing, phase requires an update"))))) + (add-before 'configure 'set-build-id + ;; Firefox will write the timestamp to output, which is harmful + ;; for reproducibility, so change it to a fixed date. Use a + ;; separate phase for easier modification with inherit. + (lambda _ + (setenv "MOZ_BUILD_DATE" + #$%librewolf-build-id))) + (replace 'configure + (lambda* (#:key inputs outputs configure-flags + #:allow-other-keys) + (setenv "AUTOCONF" + (string-append (assoc-ref inputs "autoconf") + "/bin/autoconf")) + (setenv "SHELL" + (which "bash")) + (setenv "CONFIG_SHELL" + (which "bash")) + (setenv "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE" + "system") + ;; This should use the host info probably (does firefox build on + ;; non-x86_64 though?) + (setenv "GUIX_PYTHONPATH" + (string-append (getcwd) + "/obj-x86_64-pc-linux-gnu/_virtualenvs/build")) + + ;; Use Clang, Clang is 2x faster than GCC + (setenv "AR" "llvm-ar") + (setenv "NM" "llvm-nm") + (setenv "CC" "clang") + (setenv "CXX" "clang++") + (setenv "WASM_CC" + (string-append (assoc-ref inputs + "wasm32-wasi-clang-toolchain") + "/bin/clang")) + (setenv "WASM_CXX" + (string-append (assoc-ref inputs + "wasm32-wasi-clang-toolchain") + "/bin/clang++")) + + (setenv "MOZ_NOSPAM" "1") + + (setenv "MOZBUILD_STATE_PATH" + (getcwd)) + + (let* ((mozconfig (string-append (getcwd) "/mozconfig")) + (out (assoc-ref outputs "out")) + (flags (cons (string-append "--prefix=" out) + configure-flags))) + (format #t "build directory: ~s~%" + (getcwd)) + (format #t "configure flags: ~s~%" flags) + + (define write-flags + (lambda flags + (display (string-join (map (cut string-append + "ac_add_options " <>) + flags) "\n")) + (display "\n"))) + (with-output-to-file mozconfig + (lambda () + (apply write-flags flags) + ;; The following option unsets Telemetry Reporting. With the Addons Fiasco, + ;; Mozilla was found to be collecting user's data, including saved passwords and + ;; web form data, without users consent. Mozilla was also found shipping updates + ;; to systems without the user's knowledge or permission. + ;; As a result of this, use the following command to permanently disable + ;; telemetry reporting in Firefox. + (display "unset MOZ_TELEMETRY_REPORTING\n") + (display "mk_add_options MOZ_CRASHREPORTER=0\n") + (display "mk_add_options MOZ_DATA_REPORTING=0\n") + (display + "mk_add_options MOZ_SERVICES_HEALTHREPORT=0") + (display + "mk_add_options MOZ_TELEMETRY_REPORTING=0"))) + (setenv "MOZCONFIG" mozconfig)) + (invoke "./mach" "configure"))) + (replace 'build + (lambda* (#:key (make-flags '()) + (parallel-build? #t) #:allow-other-keys) + (apply invoke "./mach" "build" + ;; mach will use parallel build if possible by default + `(,@(if parallel-build? + '() + '("-j1")) ,@make-flags)))) + (add-after 'build 'neutralise-store-references + (lambda _ + ;; Mangle the store references to compilers & other build tools in + ;; about:buildconfig, reducing Firefox's closure by 1 GiB on x86-64. + (let* ((build-dir (car (scandir "." + (cut string-prefix? + "obj-" <>)))) + (file (string-append build-dir + "/dist/bin/chrome/toolkit/content/global/buildconfig.html"))) + (substitute* file + (((format #f "(~a/)([0-9a-df-np-sv-z]{32})" + (regexp-quote (%store-directory))) + _ store hash) + (string-append store + (string-take hash 8) + "" + (string-drop hash 8))))))) + (replace 'install + (lambda _ + (invoke "./mach" "install"))) + (add-after 'install 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; The following two functions are from Guix's icecat package in + ;; (gnu packages gnuzilla). See commit + ;; b7a0935420ee630a29b7e5ac73a32ba1eb24f00b. + (define (runpath-of lib) + (call-with-input-file lib + (compose elf-dynamic-info-runpath elf-dynamic-info + parse-elf get-bytevector-all))) + (define (runpaths-of-input label) + (let* ((dir (string-append (assoc-ref inputs label) + "/lib")) + (libs (find-files dir "\\.so$"))) + (append-map runpath-of libs))) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + ;; TODO: make me a loop again + (mesa-lib (string-append (assoc-ref inputs + "mesa") + "/lib")) + ;; For the integration of native notifications + (libnotify-lib (string-append (assoc-ref inputs + "libnotify") + "/lib")) + ;; For hardware video acceleration via VA-API + (libva-lib (string-append (assoc-ref inputs + "libva") + "/lib")) + ;; VA-API is run in the RDD (Remote Data Decoder) sandbox + ;; and must be explicitly given access to files it needs. + ;; Rather than adding the whole store (as Nix had + ;; upstream do, see + ;; and + ;; linked upstream patches), we can just follow the + ;; runpaths of the needed libraries to add everything to + ;; LD_LIBRARY_PATH. These will then be accessible in the + ;; RDD sandbox. + (rdd-whitelist (map (cut string-append <> "/") + (delete-duplicates (append-map + runpaths-of-input + '("mesa" + "ffmpeg"))))) + (pulseaudio-lib (string-append (assoc-ref inputs + "pulseaudio") + "/lib")) + ;; For U2F and WebAuthn + (eudev-lib (string-append (assoc-ref inputs + "eudev") + "/lib")) + (gtk-share (string-append (assoc-ref inputs + "gtk+") + "/share"))) + (wrap-program (car (find-files lib "^librewolf$")) + `("LD_LIBRARY_PATH" prefix + (,mesa-lib ,libnotify-lib + ,libva-lib + ,pulseaudio-lib + ,eudev-lib + ,@rdd-whitelist)) + `("XDG_DATA_DIRS" prefix + (,gtk-share)) + `("MOZ_LEGACY_PROFILES" = + ("1")) + `("MOZ_ALLOW_DOWNGRADE" = + ("1")))))) + (add-after 'wrap-program 'install-desktop-entry + (lambda* (#:key outputs #:allow-other-keys) + (let* ((desktop-file + "taskcluster/docker/firefox-snap/firefox.desktop") + (applications (string-append #$output + "/share/applications"))) + (substitute* desktop-file + (("^Exec=firefox") + (string-append "Exec=" + #$output "/bin/librewolf")) + ;; "Firefox" -> "LibreWolf" in all the Name fields + (("^(Name.*)(Firefox)(.*)$" prefix _ suffix) + (string-append prefix "LibreWolf" suffix)) + ;; Remove non-Latin translations. + (("^Name\\[(ar|bn)\\]") + "") + ;; Replace "Firefox" in the keywords + (("^(Keywords.*)(Firefox)(.*)$" prefix _ suffix) + (string-append prefix "LibreWolf" suffix)) + (("Icon=.*") + "Icon=librewolf\n") + (("NewWindow") + "new-window") + (("NewPrivateWindow") + "new-private-window") + (("StartupNotify=true") + "StartupNotify=true +StartupWMClass=Navigator")) + (copy-file desktop-file "librewolf.desktop") + (install-file "librewolf.desktop" applications)))) + (add-after 'install-desktop-entry 'install-icons + (lambda* (#:key outputs #:allow-other-keys) + (let ((icon-source-dir (string-append #$output + "/lib/librewolf/browser/chrome/icons/default"))) + (for-each (lambda (size) + (let ((dest (string-append #$output + "/share/icons/hicolor/" + size + "x" + size + "/apps"))) + (mkdir-p dest) + (symlink (string-append icon-source-dir + "/default" size ".png") + (string-append dest + "/librewolf.png")))) + '("16" "32" "48" "64" "128")))))) + + ;; Test will significantly increase build time but with little rewards. + #:tests? #f + + ;; WARNING: Parallel build will consume lots of memory! + ;; If you have encountered OOM issue in build phase, try disable it. + #:parallel-build? #t + + ;; Some dynamic lib was determined at runtime, so rpath check may fail. + #:validate-runpath? #f)) + (inputs (list bash-minimal + bzip2 + cairo + cups + dbus-glib + freetype + ffmpeg + gdk-pixbuf + glib + gtk+ + gtk+-2 + hunspell + icu4c + jemalloc + libcanberra + libevent + libffi + libgnome + libjpeg-turbo + libnotify + ;; libpng-apng + libva + libvpx + libxcomposite + libxft + libxinerama + libxscrnsaver + libxt + mesa + mit-krb5 + nspr-4.32 + ;; nss + pango + pipewire + pixman + pulseaudio + speech-dispatcher + sqlite + startup-notification + eudev + unzip + zip + zlib)) + (native-inputs (list alsa-lib + autoconf-2.13 + `(,rust-librewolf "cargo") + clang + llvm + wasm32-wasi-clang-toolchain + m4 + nasm + node-lts + perl + pkg-config + python + rust-librewolf + rust-cbindgen-0.26 + which + yasm)) + (home-page "https://mozilla.org/firefox/") + (synopsis "Trademarkless version of Firefox") + (description + "Full-featured browser client built from Firefox source tree, without +the official icon and the name \"firefox\". This is the Extended Support +Release (ESR) version.") + (license license:mpl2.0)))