From patchwork Tue Feb 13 20:34:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Eure X-Patchwork-Id: 60288 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 413A027BBE9; Tue, 13 Feb 2024 20:35:21 +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,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, 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 E5FEC27BBE2 for ; Tue, 13 Feb 2024 20:35:18 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZzUW-0001nB-3w; Tue, 13 Feb 2024 15:34:56 -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 1rZzUM-0001hk-Dg for guix-patches@gnu.org; Tue, 13 Feb 2024 15:34:47 -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 1rZzUM-0007wS-5Z for guix-patches@gnu.org; Tue, 13 Feb 2024 15:34:46 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZzUc-0006K3-Bk; Tue, 13 Feb 2024 15:35:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67512] [PATCH v4 1/4] gnu: Move icu4c-73 from gnuzilla to icu4c. Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: clement@lassieur.org, jonathan.brielmaier@web.de, mhw@netris.org, guix-patches@gnu.org Resent-Date: Tue, 13 Feb 2024 20:35: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 , =?utf-8?q?Cl=C3=A9ment?= Lassieur , Jonathan Brielmaier , Mark H Weaver X-Debbugs-Original-Xcc: =?utf-8?q?Cl=C3=A9ment?= Lassieur , Jonathan Brielmaier , Mark H Weaver Received: via spool by 67512-submit@debbugs.gnu.org id=B67512.170785648524235 (code B ref 67512); Tue, 13 Feb 2024 20:35:02 +0000 Received: (at 67512) by debbugs.gnu.org; 13 Feb 2024 20:34:45 +0000 Received: from localhost ([127.0.0.1]:47768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZzUL-0006Il-7K for submit@debbugs.gnu.org; Tue, 13 Feb 2024 15:34:45 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:53951) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZzUH-0006Hx-GS for 67512@debbugs.gnu.org; Tue, 13 Feb 2024 15:34:42 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.nyi.internal (Postfix) with ESMTP id B7F0E5C00B4; Tue, 13 Feb 2024 15:34:17 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 13 Feb 2024 15:34:17 -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:subject:subject:to:to; s=fm2; t=1707856457; x= 1707942857; bh=enOsNQ8CRbPWW4n1cdI6D4rSUopgfZyrdG2iHfE31R0=; b=U fb0hQm8sOc0sWYAw8JQqAHnKReivYhrxpb5e1qpILMzP+yJ0xUhhvr+waIWx1VYH 3inc+omFV14enT573nAog5VuocRVYloWFm1po3SM9BqHTgYCObPAWuzFdJ1PbJtb Jps2OAGIEedcx0g5dnwh+7TyM7iTp2YQpHCR5vLckH/GkxvlpOUmK7gLYsalMIaW cxuop2uDf8Lv73lWklk7IQ1hGijln2qlKOnYK0h6qsoIdsYtdr0Oa/qK4bI8iKXu UWx+zOl/UyMvBJFNoLFUaJkvrbQYq6xxtFU1NBxgUsWuOxa7HoGRhjzPQVk996L6 +TdkXCZH6D91SN+wSnyMA== 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:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1707856457; x= 1707942857; bh=enOsNQ8CRbPWW4n1cdI6D4rSUopgfZyrdG2iHfE31R0=; b=c XclgmhLjvnKSumun34GslW/ikBS95OX4xagV8ERusiqa+3qxoX9qUzIFGf4aDI0b +BHsq2HLIVidMPjm6k9jTCFfo0ohgZT//lLK/zA4wELurwgAxGJENiRqeWQJgeNU be/dYgdf2poTytdrV0vSPrL+ttLV9k4EU54OEuEMCXjcryfew/vFjrgtc9ZHLUKh WNUIHbO0jwInj310XqMmb6goDUYFzsUis3wZqDFoKbNyofAp5Sy508ZsDPZ5ocPn X74D+K+TLCgyGMxwPYaJVeNUHh8WBg+vHY2D5ThDQEK9vtWNmoI6/YFAm50z68d+ 4jc4N1jSI3MBtcEPTFXWg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudehgddufeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhpvggt rdhtvheqnecuggftrfgrthhtvghrnheptddtudeludeitedvgeffleefjefgteeuudduhf eivedvtdffieettdetueeuudeknecuffhomhgrihhnpehgihhthhhusgdrtghomhdpmhho iihilhhlrgdrohhrghdpihgtuhdqphhrohhjvggtthdrohhrghenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehirghnsehrvghtrhhoshhpvggt rdhtvh X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 13 Feb 2024 15:34:16 -0500 (EST) From: Ian Eure Date: Tue, 13 Feb 2024 12:34:03 -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-73): New variable. * gnu/packages/gnuzilla.scm (icu4c-73-promise): Delete variable. Change-Id: I017e1416b70ecb94313aeb71aa4a0cafdfe0e9ab --- gnu/packages/gnuzilla.scm | 27 +-------------------------- gnu/packages/icu4c.scm | 22 ++++++++++++++++++++++ gnu/packages/tor-browsers.scm | 3 ++- 3 files changed, 25 insertions(+), 27 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 5f77512427..094ff348e9 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -375,31 +375,6 @@ (define-public mozjs-78 (list icu4c-69 readline zlib)))) -;; -;; Needed for IceCat 115. -;; -(define icu4c-73-promise - (delay - (package - (inherit icu4c) - (version "73.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 - "0iccpdvc0kvpww5a31k9gjkqigyz016i7v80r9zamd34w4fl6mx4")) - (patches - (cons - (search-patch - "icu4c-fix-TestHebrewCalendarInTemporalLeapYear.patch") - (origin-patches (package-source icu4c))))))))) - ;;; ;;; Localization helper procedures. ;;; @@ -757,7 +732,7 @@ (define-public icecat-minimal ;; https://bugzilla.mozilla.org/show_bug.cgi?id=1819374). ffmpeg-5 libvpx - (force icu4c-73-promise) + icu4c-73 pixman pulseaudio mesa diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm index 5aaf3a8361..0dfe63b20a 100644 --- a/gnu/packages/icu4c.scm +++ b/gnu/packages/icu4c.scm @@ -109,6 +109,28 @@ (define-public icu4c (license x11) (home-page "http://site.icu-project.org/"))) +(define-public icu4c-73 + (package + (inherit icu4c) + (name "icu4c") + (version "73.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 + "0iccpdvc0kvpww5a31k9gjkqigyz016i7v80r9zamd34w4fl6mx4")) + (patches + (cons + (search-patch + "icu4c-fix-TestHebrewCalendarInTemporalLeapYear.patch") + (origin-patches (package-source icu4c)))))))) + (define-public icu4c-70 (package (inherit icu4c) diff --git a/gnu/packages/tor-browsers.scm b/gnu/packages/tor-browsers.scm index c4ce997b99..ee5e072102 100644 --- a/gnu/packages/tor-browsers.scm +++ b/gnu/packages/tor-browsers.scm @@ -52,6 +52,7 @@ (define-module (gnu packages tor-browsers) #:use-module (gnu packages golang) #:use-module (gnu packages gtk) #:use-module (gnu packages hunspell) + #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages kerberos) #:use-module (gnu packages libcanberra) @@ -270,7 +271,7 @@ (define* (make-torbrowser #:key ;; https://bugzilla.mozilla.org/show_bug.cgi?id=1819374). ffmpeg-5 libvpx - (force (@@ (gnu packages gnuzilla) icu4c-73-promise)) + icu4c-73 pixman pulseaudio mesa From patchwork Tue Feb 13 20:34:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ian Eure X-Patchwork-Id: 60290 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 D3A4827BBE9; Tue, 13 Feb 2024 20:35:27 +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,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, 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 C639627BBE2 for ; Tue, 13 Feb 2024 20:35:26 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZzUR-0001l8-BX; Tue, 13 Feb 2024 15:34:51 -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 1rZzUM-0001hi-47 for guix-patches@gnu.org; Tue, 13 Feb 2024 15:34:47 -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 1rZzUL-0007wH-Jd for guix-patches@gnu.org; Tue, 13 Feb 2024 15:34:45 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZzUc-0006K9-QL for guix-patches@gnu.org; Tue, 13 Feb 2024 15:35:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67512] [PATCH v4 2/4] gnu: nss: Update to 3.97. Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Feb 2024 20:35: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.170785648624244 (code B ref 67512); Tue, 13 Feb 2024 20:35:02 +0000 Received: (at 67512) by debbugs.gnu.org; 13 Feb 2024 20:34:46 +0000 Received: from localhost ([127.0.0.1]:47770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZzUL-0006Ir-Pb for submit@debbugs.gnu.org; Tue, 13 Feb 2024 15:34:46 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:33493) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZzUH-0006I0-Qx for 67512@debbugs.gnu.org; Tue, 13 Feb 2024 15:34:43 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 135105C00D6; Tue, 13 Feb 2024 15:34:19 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 13 Feb 2024 15:34:19 -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:subject:subject:to:to; s=fm2; t=1707856459; x=1707942859; bh=OP9vnT2CuYajB32UXMqbGR7aHLCogfh6ACoSI8xsRik=; b= WElaQuMfSzJBHsHlzUl+OPnMW/Q+SFthbFG7QAQ6W7zyrty4GPG2dNiBPOhboccM JslUOzsfXJp7pfx+JJhXt0XEJf2TRwvSiskwFDVlHa6VIm5lXIpEp4bAmpQ/BkSZ +6bEpiPlO9I+fTx4SG892i7YFvOvF1uIt1HBW4KSh8+5BPczbfwckIlemkGqdBWi YhOILM6KEc67rnSc/qAKBtkwObE4rXTWxi6c/YITZtqMAB99T6TY7SEUijEOxeVJ S9JxFXAB/EeoI/zsyPiyYBCvtzuJ9b6dTU2oeB7poFlvOGofiwwhd6zJeESMdKfv M5bd+WEfk9qCQO9FlBDCuA== 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:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1707856459; x= 1707942859; bh=OP9vnT2CuYajB32UXMqbGR7aHLCogfh6ACoSI8xsRik=; b=K w6bUrladpOO8RbeEO65mOPcCF4Svv+UPcP/as9MRrEGAVyP/Go9LZSTNBtipo/5c WiBcDKoJCmB36IKYQKDkLiKs1hIawrvwAQ7eJhC/cclK2pMtkodPpxjdVztXT2eV n1NeLPdX7deovz0JXskxfJC7zmRsw2e2EN33q3j8FYoOzHc0Il+6X3Xqb4PhKzav BvYKq6Qh4ubXKOGJ2hVsb68TFX6IBIpmIggc/QugMWMTQDojDVsMrFlK9pRNbCOV fVeeGGbZB5tc8C75R+9El7++080m5ULGh63RFTzV5yC2tHgmiAAjTmxEAVRMVwRV RztAUPVUCOdJ/Mzv3whwQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudehgddufeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesth ekredtredtjeenucfhrhhomhepkfgrnhcugfhurhgvuceoihgrnhesrhgvthhrohhsphgv tgdrthhvqeenucggtffrrghtthgvrhhnpeejfeffheeffeeghefhvdekiefggfeigfevhe etffehtdetffefgfduveeuvedtffenucffohhmrghinhepmhhoiihilhhlrgdrohhrghen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehirghnse hrvghtrhhoshhpvggtrdhtvh X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 13 Feb 2024 15:34:18 -0500 (EST) From: Ian Eure Date: Tue, 13 Feb 2024 12:34:04 -0800 Message-ID: <134355782c0831601fad01d54581d4bf05742b0b.1707855137.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/nss.scm (nss): Update to 3.97. * gnu/packages/certs.scm (nss-certs): Update to 3.97. --- gnu/packages/certs.scm | 4 ++-- gnu/packages/nss.scm | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gnu/packages/certs.scm b/gnu/packages/certs.scm index 58b4d50ec8..2a6106df78 100644 --- a/gnu/packages/certs.scm +++ b/gnu/packages/certs.scm @@ -131,7 +131,7 @@ (define-public nss-certs ;; XXX We used to refer to the nss package here, but that eventually caused ;; module cycles. The below is a quick copy-paste job that must be kept in ;; sync manually. Surely there's a better way…? - (version "3.88.1") + (version "3.97") (source (origin (method url-fetch) (uri (let ((version-with-underscores @@ -142,7 +142,7 @@ (define-public nss-certs "nss-" version ".tar.gz"))) (sha256 (base32 - "15il9fsmixa1r4446zq1wl627sg0hz9h67w6kjxz273xz3nl7li7")) + "02pscmkp7flawmgwqzr807nsn6kzzw7r7xjbzfql0bpkjf1zp3h7")) ;; Create nss.pc and nss-config. (patches (search-patches "nss-3.56-pkgconfig.patch" "nss-getcwd-nonnull.patch" diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm index 54b9e5041a..268ddaa24f 100644 --- a/gnu/packages/nss.scm +++ b/gnu/packages/nss.scm @@ -106,7 +106,7 @@ (define-public nss ;; IMPORTANT: Also update and test the nss-certs package, which duplicates ;; version and source to avoid a top-level variable reference & module ;; cycle. - (version "3.88.1") + (version "3.97") (source (origin (method url-fetch) (uri (let ((version-with-underscores @@ -117,7 +117,7 @@ (define-public nss "nss-" version ".tar.gz"))) (sha256 (base32 - "15il9fsmixa1r4446zq1wl627sg0hz9h67w6kjxz273xz3nl7li7")) + "02pscmkp7flawmgwqzr807nsn6kzzw7r7xjbzfql0bpkjf1zp3h7")) ;; Create nss.pc and nss-config. (patches (search-patches "nss-3.56-pkgconfig.patch" "nss-getcwd-nonnull.patch" @@ -200,7 +200,7 @@ (define-public nss ;; leading to test failures: ;; . To ;; work around that, set the time to roughly the release date. - (invoke "faketime" "2022-11-01" "./nss/tests/all.sh")) + (invoke "faketime" "2024-01-23" "./nss/tests/all.sh")) (format #t "test suite not run~%")))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) From patchwork Tue Feb 13 20:34:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ian Eure X-Patchwork-Id: 60289 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 3015127BBEA; Tue, 13 Feb 2024 20:35: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.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED,URIBL_SBL_A 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 5998827BBE2 for ; Tue, 13 Feb 2024 20:35:23 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZzUR-0001l4-9N; Tue, 13 Feb 2024 15:34:51 -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 1rZzUM-0001hj-4I for guix-patches@gnu.org; Tue, 13 Feb 2024 15:34:47 -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 1rZzUL-0007wJ-Mf for guix-patches@gnu.org; Tue, 13 Feb 2024 15:34:45 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZzUd-0006KH-8e for guix-patches@gnu.org; Tue, 13 Feb 2024 15:35:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67512] [PATCH v4 3/4] gnu: Add wasm packages. Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Feb 2024 20:35: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.170785648724251 (code B ref 67512); Tue, 13 Feb 2024 20:35:03 +0000 Received: (at 67512) by debbugs.gnu.org; 13 Feb 2024 20:34:47 +0000 Received: from localhost ([127.0.0.1]:47772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZzUM-0006Iz-C4 for submit@debbugs.gnu.org; Tue, 13 Feb 2024 15:34:47 -0500 Received: from fout8-smtp.messagingengine.com ([103.168.172.151]:51103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZzUJ-0006I2-2A for 67512@debbugs.gnu.org; Tue, 13 Feb 2024 15:34:44 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.nyi.internal (Postfix) with ESMTP id 4B4DF13800EF; Tue, 13 Feb 2024 15:34:20 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 13 Feb 2024 15:34:20 -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:subject:subject:to:to; s=fm2; t=1707856460; x=1707942860; bh=MNK98XLfq6CqwXiea4qFO0rELVUQ9vopcBmO9epUh8E=; b= BpU8jDNU3y+VvqP37naam+m1mKvUp78+BgCKVAmCqcJBFgbtEJNDbB94vk1anBFe dqcICHI0l2zdkXR2Gg9xIQ9lPBN2pzDC0VAV4kI/yjNbfMkkUjkehyUveClaBWOG 6JHZqpDhqcddTyx/omDds7asAqH7/H5o9mhFoWlLkiWh1F75fx9Rul7btFI5xgKj zZz7/PdzJObHypfQl+1mK43+5gmrdITmx6rTGClIqUkeNXyXyyMFWU0SvWeHPCl2 YiE4vV4CS9sgwX9c9QmuiHRV1fsT6VMHuNGhBHzN7ftwbZtUomX7nyNZPyJX6M0R sxXBQw6yPUHOlmP9vqWAuQ== 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:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1707856460; x= 1707942860; bh=MNK98XLfq6CqwXiea4qFO0rELVUQ9vopcBmO9epUh8E=; b=B JENxs7s7EjAtHrmveSKEWq+Y+zP/p6/BQCM2h2zQlnEWFgFrS/El0DGmQHFrmPqS hU4nfjxzMVgrMvOCJguRZRHTxF2CM6UeFAvocgYOaffQGaaJJg9KXksF2eQmbxsd l/zDMe3ntHcZP1KxhjCnfepK3dQX4BtLoCn2alSTrS81GHh/uUtI036W+43JCGzZ KL47jLueetNrj1Jxhe5zZCl7QOwPx5t0ov4GXKruKJPA75r24C4FHOcuXdCHJoev bNgJHKA93yKJ9D2LC2x3GhTU+v6RT+6MFVPf7iHEvX8sFbfVwBhBM6r5ZRzzRhOS 73wJEne2UHqDridA1DFsA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudehgddufeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesth ekredtredtjeenucfhrhhomhepkfgrnhcugfhurhgvuceoihgrnhesrhgvthhrohhsphgv tgdrthhvqeenucggtffrrghtthgvrhhnpedujefffeduleeuvdehueehtdevgfekgfetve egleejleefjefhtdevheevtdekfeenucffohhmrghinhepghhnuhdrohhrghdpghhithhh uhgsrdgtohhmpdhmohiiihhllhgrrdhorhhgpdifrghsihdruggvvhdplhhlvhhmrdhorh hgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihgr nhesrhgvthhrohhsphgvtgdrthhv X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 13 Feb 2024 15:34:19 -0500 (EST) From: Ian Eure Date: Tue, 13 Feb 2024 12:34:05 -0800 Message-ID: <39662eaab8ebb73981be67f42a0277c2013be76b.1707855137.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/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. --- 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 Feb 13 20:34:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ian Eure X-Patchwork-Id: 60287 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 DA15C27BBE2; Tue, 13 Feb 2024 20:35:10 +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,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, 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 B604227BBEA for ; Tue, 13 Feb 2024 20:35:04 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZzUQ-0001ky-Fx; Tue, 13 Feb 2024 15:34:50 -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 1rZzUM-0001hl-Ew for guix-patches@gnu.org; Tue, 13 Feb 2024 15:34:47 -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 1rZzUM-0007wT-6X for guix-patches@gnu.org; Tue, 13 Feb 2024 15:34:46 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZzUd-0006KO-P0 for guix-patches@gnu.org; Tue, 13 Feb 2024 15:35:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67512] [PATCH v4 4/4] gnu: Add librewolf. Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Feb 2024 20:35: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.170785649324269 (code B ref 67512); Tue, 13 Feb 2024 20:35:03 +0000 Received: (at 67512) by debbugs.gnu.org; 13 Feb 2024 20:34:53 +0000 Received: from localhost ([127.0.0.1]:47774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZzUR-0006JL-Ew for submit@debbugs.gnu.org; Tue, 13 Feb 2024 15:34:53 -0500 Received: from fhigh2-smtp.messagingengine.com ([103.168.172.153]:48839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZzUK-0006I9-Eg for 67512@debbugs.gnu.org; Tue, 13 Feb 2024 15:34:47 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 9DBA81140099; Tue, 13 Feb 2024 15:34:21 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 13 Feb 2024 15:34:21 -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:subject:subject:to:to; s=fm2; t=1707856461; x=1707942861; bh=9YPTzWgv+pFEHYCgMYaflzwV9NQCTOyDiF/A4DrWKYM=; b= igbYqpmYca8SkJS0/Um1wGUwwnPq7Gm6gP/sinZEDRdmft9OPwfBvF14TA/8uOLN bwo9CjVcfl2lBrVGNqGuFJM7Kbm5VrEb63yNFGZPW/ffbt+R1tEgMwwXp5KIA0/3 +9AW5FcIlG6n8/SZmEUw62UeEfUGj9tqIgzknsQPctzsuhAZnylJHI4F64WUfmZU uZXDc9dN5c91owE2XTsQmMDOCWX9JoktKDQWudOQIIKDGkTcyx8pcp7hgAGDLYbQ xy0NNU+phh1MyEmykqv4MMKV4pIYwz6cIuoj9yEIalFOrZxSwZqRG6YgIajb/att f2d8zVsUevdkK+e0ogyhNQ== 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:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1707856461; x= 1707942861; bh=9YPTzWgv+pFEHYCgMYaflzwV9NQCTOyDiF/A4DrWKYM=; b=i PoagF95+FvzDpD1arSBH2ByXQfLkXFd2+X49Mzqw6S3x8RTuq+ODcrWUAY1Sx+Vk 2EVS5nlftwWHwjCdRBTpIs9ZOGvLjDibz4r9zmpHSja0BMVhy6vHtiW0toeSpi22 pUbnB/qHoDBp+Y+wjQENshUY4KcRNt+7WTK+y/O/HXHIQ+iVQQU/0DcNCuDFslvj Egwojd6xMwmzQaAB46q49CwAntduGG+rJrVhfiB7cSMMCwDNU/UVKyzPUcgSsGPz iDmtxLuZlgzYMp/6egCnZD+duu5ysUfswogao2gNllHQcjStrxqiAce8BtVfNc19 avwKs2LmEZSNSKR/MG0Gw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudehgddufeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesth ekredtredtjeenucfhrhhomhepkfgrnhcugfhurhgvuceoihgrnhesrhgvthhrohhsphgv tgdrthhvqeenucggtffrrghtthgvrhhnpeekveffleelheetffekteefvddtveegteeife etgfduleetjeelteefueekffetheenucffohhmrghinhepghhnuhdrohhrghdpshgvrghr tghhfhhogidrohhrghdpghhithhlrggsrdgtohhmpdgtohhnthgvnhhtrdhrvggrugdpmh hoiihilhhlrgdrohhrghdpghgvthgrugguohhnshdrshgvrghrtghhpdhgvghtrgguugho nhhsrdhlihhnkhdpghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrthhv X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 13 Feb 2024 15:34:20 -0500 (EST) From: Ian Eure Date: Tue, 13 Feb 2024 12:34:06 -0800 Message-ID: <96c848a2d5ce1f456187ea47a3151a21079b333a.1707855137.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/librewolf.scm (librewolf): New variable. Change-Id: I98b6410582b856ede83b79637a58e66d6e5832e6 --- gnu/packages/librewolf.scm | 642 +++++++++++++++++++++++++++++++++++++ 1 file changed, 642 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..6aa84ee372 --- /dev/null +++ b/gnu/packages/librewolf.scm @@ -0,0 +1,642 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013, 2015, 2024 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 pciutils) + #: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 "20240130195200") + +(define-public librewolf + (package + (name "librewolf") + (version "122.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 "0ggysgbazx5dl0l9dyvrpjgzbvivgddm9qyiyvjjfk9im9sljkxh")))) + (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" + "--with-system-webp" + "--with-system-icu" + "--with-system-libvpx" + "--with-system-libevent" + "--with-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.guix" + "--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" + "--disable-eme" + + ;; 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. + (string-append + "e3b0c44298fc1c149afbf4c8996fb924" + "27ae41e4649b934ca495991b7852b855"))) + (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 (string-append + "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 "MOZ_APP_NAME" "librewolf") + + (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"))) + (add-before 'build '1fix-addons-placeholder + (lambda _ + (substitute* + "toolkit/locales/en-US/toolkit/about/aboutAddons.ftl" + (("addons.mozilla.org") "gnuzilla.gnu.org")))) + (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 'remove-duplicate-bin + (lambda* (#:key outputs #:allow-other-keys) + (delete-file (string-append #$output + "/lib/librewolf/librewolf-bin")))) + (add-after 'install 'wrap-glxtest + ;; glxtest uses dlopen() to load mesa + ;; libs, wrap it to set LD_LIBRARY_PATH. + (lambda* (#:key inputs outputs #:allow-other-keys) + (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")) + (pciutils-lib (string-append (assoc-ref inputs + "pciutils") "/lib"))) + (wrap-program (car (find-files lib "^glxtest$")) + `("LD_LIBRARY_PATH" prefix + (,mesa-lib ,pciutils-lib)))))) + (add-after 'install 'patch-config + (lambda* (#:key inputs #:allow-other-keys) + (let ((lib (string-append #$output "/lib/librewolf")) + (config-file "librewolf.cfg")) + + ;; Required for Guix packaged extensions + ;; SCOPE_PROFILE=1, SCOPE_APPLICATION=4, SCOPE_SYSTEM=8 + ;; Default is 5. + (substitute* (in-vicinity lib config-file) + (("defaultPref\\(\"extensions.enabledScopes\", 5\\)") + "defaultPref(\"extensions.enabledScopes\", 13)")) + ;; Use Mozzarella addons repo. + (call-with-port + (open-file (in-vicinity lib config-file) "a") + (lambda (port) + ;; Add-ons panel (see settings.js in Icecat source). + (for-each + (lambda (pref) + (format port "defaultPref(~s, ~s);~%" + (car pref) (cdr pref))) + '(("extensions.getAddons.search.browseURL" . + "https://gnuzilla.gnu.org/mozzarella/search.php?q=%TERMS%") + ("extensions.getAddons.get.url" . + "https://gnuzilla.gnu.org/mozzarella") + ("extensions.getAddons.link.url" . + "https://gnuzilla.gnu.org/mozzarella") + ("extensions.getAddons.discovery.api_url" . + "https://gnuzilla.gnu.org/mozzarella") + ("extensions.getAddons.langpacks.url" . + "https://gnuzilla.gnu.org/mozzarella") + ("lightweightThemes.getMoreURL" . + "https://gnuzilla.gnu.org/mozzarella")))))))) + (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")) + (apng-lib (string-append (assoc-ref inputs + "libpng-apng") "/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 + ,apng-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" everywhere + (("Firefox") + "LibreWolf") + ;; Remove non-Latin translations. + (("^Name\\[(ar|bn)\\].*$") + "") + (("^Icon=.*") + (string-append "Icon=" + #$output + "/share/icons/hicolor/128x128/apps/librewolf.png +")) + ;; These commands were changed. + (("-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-73 + jemalloc + libcanberra + libevent + libffi + libgnome + libjpeg-turbo + libnotify + libpng-apng + libva + libvpx + libwebp + libxcomposite + libxft + libxinerama + libxscrnsaver + libxt + mesa + mit-krb5 + nspr + nss + pango + pciutils + 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)))