From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4oyGFQ148mNSuAAAbAwnHQ (envelope-from ) for ; Sun, 19 Feb 2023 20:27:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OGeYEw148mMCGAAAG6o9tA (envelope-from ) for ; Sun, 19 Feb 2023 20:27:09 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C2674FD49 for ; Sun, 19 Feb 2023 20:27:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTpK2-0005sw-2C; Sun, 19 Feb 2023 14:26: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 1pTpK0-0005rC-IQ for bug-guix@gnu.org; Sun, 19 Feb 2023 14:26:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pTpK0-0007Ef-91 for bug-guix@gnu.org; Sun, 19 Feb 2023 14:26:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pTpK0-0000r3-4X for bug-guix@gnu.org; Sun, 19 Feb 2023 14:26:04 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#32026: [PATCH v4 6/9] gnu: Add language packs to icecat and icedove. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 19 Feb 2023 19:26:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32026 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 32026@debbugs.gnu.org Cc: mhw@netris.org, ludo@gnu.org, Jonathan Brielmaier , Maxim Cournoyer Received: via spool by 32026-submit@debbugs.gnu.org id=B32026.16768347303189 (code B ref 32026); Sun, 19 Feb 2023 19:26:04 +0000 Received: (at 32026) by debbugs.gnu.org; 19 Feb 2023 19:25:30 +0000 Received: from localhost ([127.0.0.1]:49706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTpJR-0000pG-Kg for submit@debbugs.gnu.org; Sun, 19 Feb 2023 14:25:30 -0500 Received: from mail-qt1-f172.google.com ([209.85.160.172]:37857) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTpJI-0000o5-Iu for 32026@debbugs.gnu.org; Sun, 19 Feb 2023 14:25:21 -0500 Received: by mail-qt1-f172.google.com with SMTP id cf6so686161qtb.4 for <32026@debbugs.gnu.org>; Sun, 19 Feb 2023 11:25:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WBdhaMUT+4MW4oeY357fyXMU+nxUeN+t8od7yqkLiZM=; b=Rj9YSGc38vtLcoOFPh1zXXq3BmZd58fRiSR4HyoFgxmhSDYPkgSkIhjPdeO3q4SrK9 pHhiHW6LZM++J22WBmxKQlpBWGDaoka8g0u6CEMZDrng5azHcp5/x3cZe3miAlY5mjRu ly9b/a9je5e39r7gU2gkL4Xd2WVurcJn4CkSHiTRuj3F0SiLxJyjVnIVVxZ+qT3kkhCE DZlx92YQW8YJwikJAz4sAUYubmWZPGgO2jBUh+LFHzbX18mjAO6ZZ9C0Dj/Ez0u/WMmA 85EF6WMEwtK1YDlsX6uOAmsq1abcqc3l5f3Cq7LT74vr16pbLCfnjYBB8cYbR4EWlmKh eBXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WBdhaMUT+4MW4oeY357fyXMU+nxUeN+t8od7yqkLiZM=; b=mvA+QRwaaDQBwAR3CT3zxzjCex1cYBDm1W87kuzJ1uREsg9e34six9P6esqdsuYJUV hvTIFvAVY4DX61bAXV/AptxKRe9E7ruZ7rNyex8xenY/nAPVFPDHf6X88r55NiZZyMrn nCUsIewPT0yXWbTYbEGxF0bKIK6cnTtQuFjEaQZoxAn4d87/c4phL93labQofylU7Rq+ 6taIMmao5bB9Kr1wmWG1i0rl3kbhY79fS2uJxbj7mbFXewsnq4GY29wimnprssJPBX9h dnMD0kHCcy2KH/v4c3Ki85sKwiOU0j7Mxwn/GUX9rfKEFhTLV8ZDAWTlavriYXll5ki9 n1eg== X-Gm-Message-State: AO0yUKUDdweImQwhLSOxy891ThURkh20jngnauUaM/2ZsYeODPk0If34 BnpSrclMODCL88CILa2lzJMXcOoUkJW3gQ== X-Google-Smtp-Source: AK7set93acDAvsnEcqC1pXXoUlgzjhwpTF30JrMoMuzHG1ML9spekLfEDUNE3/Uj9nrV1AKChBOCwg== X-Received: by 2002:a05:622a:178d:b0:3b8:26a7:d608 with SMTP id s13-20020a05622a178d00b003b826a7d608mr8250431qtk.19.1676834714957; Sun, 19 Feb 2023 11:25:14 -0800 (PST) Received: from localhost.localdomain (dsl-158-213.b2b2c.ca. [66.158.158.213]) by smtp.gmail.com with ESMTPSA id bz18-20020a05622a1e9200b003be56bdd3b1sm3288914qtb.92.2023.02.19.11.25.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Feb 2023 11:25:14 -0800 (PST) From: Maxim Cournoyer Date: Sun, 19 Feb 2023 14:24:02 -0500 Message-Id: <20230219192405.26549-6-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230219192405.26549-1-maxim.cournoyer@gmail.com> References: <20230219192405.26549-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Rj9YSGc3; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676834829; a=rsa-sha256; cv=none; b=uy46EChlspnwC/DxlXhOSDJk20ZioNJbaEkkRZnRPKJgca6z+H2BJJX2lUMfm+AyQCXi8r VE57tG1btvt1sKa3EPza5bcM8m1odTqNAKJYcyYBEZ39GXuk7G0T9AS/9TQfdVnoj1pL1q P+GKRbEdFiEBWmrhf27KJudLu25VfmZXQ3saN68z4z6traNAtSCRbr8GY7ENuxZnzarbGi AoZSJRzzOKkD40Sh2Y8D2vFsph0iupfbjaOUsqbMRtTU9zIwb2pMQdudo5+jDwzwdZBySQ bSK9QgkGc4zJrS7OiOQhaAPZeJOxfRc/4XRXrO90sCt9RvROtD2h57rBr7/5+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676834829; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=WBdhaMUT+4MW4oeY357fyXMU+nxUeN+t8od7yqkLiZM=; b=LYlzhgYGkavahskXDKWH8BUMzf7Jy3RPamkOf02xcmiGlbW552h41HBN/CqGuk47vbUviN qV3LXO+PSh5V+eQwRFwa7yvuHWmaLNRHhhHpsgqW/roxzIs5iKD7HAbarmhx5K9W388AYT F6+BpgShUj4Ra69P6TJgcH4AgrBt3SbrXPemsaOT7YdW04rUu8KriJGcMIQA5YvA7f1pFh 2unSDKHgtscEq8fAv/FFD2dEDAzbcRqwKYYoFRVFhR8eknKOAbxo1W+znVoLtwq8IxmZuB yhlgsIk99pPcBZamPkA8z+Xv50abT+ge6hr04K7V20p0YgKrlB5GNYxHP86szw== X-Migadu-Spam-Score: -0.04 X-Spam-Score: -0.04 X-Migadu-Queue-Id: C2674FD49 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Rj9YSGc3; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-TUID: 1K/jKSByzGJ7 Fixes . * gnu/packages/gnuzilla.scm (icecat): Rename to... (icecat-minimal): ... this. (icedove: Rename to... (icedove-minimal): ... this. (make-mozilla-with-l10n): New procedure. (icecat, icedove): New variables. --- (no changes since v3) Changes in v3: - Make make-l10n-package more functional, taking inputs as arguments - Validate the PROJECT argument in make-l10n-package Changes in v2: - Do not clear native-inputs and inputs in make-mozilla-with-l10n, for 'guix shell -D icecat' gnu/packages/gnuzilla.scm | 133 ++++++++++++++++++++++++++++---------- 1 file changed, 100 insertions(+), 33 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 38c34251ab..ab2065054a 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -671,9 +671,9 @@ (define icecat-source "--sort=name" icecat-dir))))))))) -(define-public icecat +(define-public icecat-minimal (package - (name "icecat") + (name "icecat-minimal") (version %icecat-version) (source icecat-source) (build-system gnu-build-system) @@ -1295,9 +1295,9 @@ (define icedove-source "--sort=name" #$name)))))))) -(define-public icedove +(define-public icedove-minimal (package - (name "icedove") + (name "icedove-minimal") (version %icedove-version) (source icedove-source) (properties @@ -1547,35 +1547,6 @@ (define-public icedove Thunderbird. It supports email, news feeds, chat, calendar and contacts.") (license license:mpl2.0))) -(define-public icedove/wayland - (package - (inherit icedove) - (name "icedove-wayland") - (build-system trivial-build-system) - (arguments - (list - #:modules '((guix build utils)) - #:builder - #~(begin - (use-modules (guix build utils)) - (let* ((exe (string-append #$output "/bin/icedove"))) - (mkdir-p (dirname exe)) - (call-with-output-file exe - (lambda (port) - (format port "#!~a - MOZ_ENABLE_WAYLAND=1 exec ~a $@" - #$(file-append bash-minimal "/bin/bash") - #$(file-append icedove "/bin/icedove")))) - (chmod exe #o555) - ;; Provide the manual and .desktop file. - (copy-recursively (string-append #$icedove "/share") - (string-append #$output "/share")) - (substitute* (string-append #$output - "/share/applications/icedove.desktop") - ((#$icedove) #$output)))))) - (native-inputs '()) - (inputs '()))) - (define (make-l10n-package project version source locales) "Return a package for PROJECT, a symbol (either icecat or icedove), with their corresponding VERSION, SOURCE and LOCALES variables." @@ -1698,6 +1669,102 @@ (define-public icecat-l10n (define-public icedove-l10n (make-l10n-package 'icedove %icedove-version icedove-source %icedove-locales)) +;;; This hack exists because there's no way to configure extra extension +;;; search paths for IceCat or Icedove. The global extensions directory is +;;; constructed relatively to the executable file name. +(define (make-mozilla-with-l10n project base l10n-package) + "Return a package definition for PROJECT (a symbol such as 'icecat or +'icedove) that combines the BASE package with L10N-PACKAGE." + + (unless (member project '(icecat icedove)) + (error "only icecat or icedove components are currently supported")) + + (let ((name (symbol->string project)) + (icecat? (eq? 'icecat project))) + (package + (inherit base) + (name (symbol->string project)) + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build union) + (guix build utils)) + #:builder + #~(begin + (use-modules (guix build union) + (guix build utils)) + + (union-build #$output (list #$base #$l10n-package) + #:create-all-directories? #t) + + (define* (expose name #:optional (proc copy-file) + #:key (source #$base)) + (let ((dest (string-append #$output "/" name))) + (mkdir-p (dirname dest)) + (proc (string-append source "/" name) dest))) + + (let ((wrapper (string-append "lib/" #$name "/" #$name)) + (real-binary (string-append "lib/" #$name "/." #$name + "-real")) + (desktop-file (string-append "share/applications/" + #$name ".desktop"))) + ;; Copy wrapper file. + (delete-file (string-append #$output "/" wrapper)) + (expose wrapper) + + ;; Recreate bin symlink. + (delete-file (string-append #$output "/bin/" #$name)) + (symlink (string-append #$output "/" wrapper) + (string-append #$output "/bin/" #$name)) + + ;; Copy actual binary. + (delete-file (string-append #$output "/" real-binary)) + (expose real-binary) + + ;; Copy desktop file. + (delete-file (string-append #$output "/" desktop-file)) + (expose desktop-file) + + ;; Adjust the references in the desktop file and wrapper. + (substitute* (list (string-append #$output "/" desktop-file) + (string-append #$output "/" wrapper)) + ((#$base) #$output))))))))) + +(define-public icecat + (make-mozilla-with-l10n 'icecat icecat-minimal icecat-l10n)) + +(define-public icedove + (make-mozilla-with-l10n 'icedove icedove-minimal icedove-l10n)) + +(define-public icedove/wayland + (package + (inherit icedove) + (name "icedove-wayland") + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build utils)) + #:builder + #~(begin + (use-modules (guix build utils)) + (let* ((exe (string-append #$output "/bin/icedove"))) + (mkdir-p (dirname exe)) + (call-with-output-file exe + (lambda (port) + (format port "#!~a + MOZ_ENABLE_WAYLAND=1 exec ~a $@" + #$(file-append bash-minimal "/bin/bash") + #$(file-append icedove "/bin/icedove")))) + (chmod exe #o555) + ;; Provide the manual and .desktop file. + (copy-recursively (string-append #$icedove "/share") + (string-append #$output "/share")) + (substitute* (string-append #$output + "/share/applications/icedove.desktop") + ((#$icedove) #$output)))))) + (native-inputs '()) + (inputs '()))) + (define-public firefox-decrypt (package (name "firefox-decrypt") -- 2.39.1