From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yMwEAnuz7WMMygAAbAwnHQ (envelope-from ) for ; Thu, 16 Feb 2023 05:39:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id uCtIAXuz7WMEkAAAG6o9tA (envelope-from ) for ; Thu, 16 Feb 2023 05:39:23 +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 B83FB1EAA8 for ; Thu, 16 Feb 2023 05:39:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSW26-000613-2Q; Wed, 15 Feb 2023 23:38:10 -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 1pSW24-000607-Az for bug-guix@gnu.org; Wed, 15 Feb 2023 23:38:08 -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 1pSW24-0007mS-05 for bug-guix@gnu.org; Wed, 15 Feb 2023 23:38:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pSW23-0003Om-Qu for bug-guix@gnu.org; Wed, 15 Feb 2023 23:38:07 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#32026: [PATCH 07/10] gnu: Add language packs to icecat and icedove. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 16 Feb 2023 04:38:07 +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.167652224112934 (code B ref 32026); Thu, 16 Feb 2023 04:38:07 +0000 Received: (at 32026) by debbugs.gnu.org; 16 Feb 2023 04:37:21 +0000 Received: from localhost ([127.0.0.1]:34596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSW1I-0003MR-DB for submit@debbugs.gnu.org; Wed, 15 Feb 2023 23:37:21 -0500 Received: from mail-qt1-f174.google.com ([209.85.160.174]:33429) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSW1B-0003KQ-2U for 32026@debbugs.gnu.org; Wed, 15 Feb 2023 23:37:14 -0500 Received: by mail-qt1-f174.google.com with SMTP id h24so1081130qtr.0 for <32026@debbugs.gnu.org>; Wed, 15 Feb 2023 20:37:13 -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=E/nicBCK7b3L5DmKfveBEFHk4DpOzJMzMp6EB+2uTC0=; b=RUBQ1xRGdVMnNWCuzsmmh/7sjhZ3dOB+xUis1RYrPtfSFVw3oB1DwDO1TEPPQw0JGe we7XjEOmy02UCDR4uPNTtUkJ865WdyfsTPA13c+gVLRcF3l3lXxpsktRWiov+0+2L0HR VvRCv4SyVWNrTTfRRXunci3l0M2rCkJYLhPO6sCiHtHYI9xArrkMjzBV/vn/EKUtxo2t VnEWP9jSs8DpayqGVaVclfPt9QMNproaF1Fw/FBwc2dzBCoOVFk1D3kDHrY/a0kch/zI NTyMN9GNOm+bYc27tpvklo2PJBTFwHJG9KrOvkwPlJxpkT4pSge0E60Ils30whEcz1aB 3Ptw== 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=E/nicBCK7b3L5DmKfveBEFHk4DpOzJMzMp6EB+2uTC0=; b=ScuUtIKuB9KfdsnL+CaGI8AlGYO/e58zTQ3/kRJLVWCYclaSq5i/HZaawLV4RWZdLD y4odcrot2OVis0xf4t/UMVbWef6tVHB4mWAaDHhokJHNL5IqiH4D3ui7/hNJmeQ2M7sa qPUBp3hQuTLMe09vOOz+fJskiAcCFdK8rAG6BceXe2ZDkUFPjlEElmtA6mhiRd32bl9D CaQuhCgiPdRCSvVo0i/Y5wC473vrXzb6dp2RofDLk5V49abJ8twJpkAuLqdo52nWupsL ufoswSncNLXWC1nKeTwVPqaKssX+hm4TTE1h7H1saV7GWVlHpUQY5AOuAUA8WY6DXO6z Fiug== X-Gm-Message-State: AO0yUKUNVAdIj5vG++rsRJoXZ19U8QfPm/djrofgi5bhwPnn9qPtSmgz bpfzjMUOZFW0vDuxJWBGap0h//dvqgg5yN2H X-Google-Smtp-Source: AK7set8MZeVZMtAr93xmAB6mTc17NiyMGsLQT+O7FuOOfapMHT9sA2o8/J/U/UCE698ApIwLJ1MSEQ== X-Received: by 2002:a05:622a:4d0:b0:3bc:f954:323a with SMTP id q16-20020a05622a04d000b003bcf954323amr7845478qtx.62.1676522227425; Wed, 15 Feb 2023 20:37:07 -0800 (PST) Received: from localhost.localdomain (dsl-155-109.b2b2c.ca. [66.158.155.109]) by smtp.gmail.com with ESMTPSA id t85-20020a374658000000b007186c9e167esm452992qka.52.2023.02.15.20.37.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 20:37:07 -0800 (PST) From: Maxim Cournoyer Date: Wed, 15 Feb 2023 23:36:45 -0500 Message-Id: <20230216043649.32119-7-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230216043649.32119-1-maxim.cournoyer@gmail.com> References: <20230216043649.32119-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-Seal: i=1; s=key1; d=yhetil.org; t=1676522362; a=rsa-sha256; cv=none; b=KO/dN626v2RBdbEnDGvv6yTTxhSVtne/H/YGwMw79+D9KmBgLS9f6U63sdj21RLZ0ZY3Ge Si8qMxDRJYKtC0R+61XutZ8JSo3cMwE4qBGTNrfQ7qWikk8iKhXcnTf/VGGI47Cv8r9NIG q3dt/maQn4tD93G6QdZIlp75MW0Hdqefs/mS9aB0VoZxtUPqcA+No9uBdrzAnXysKvS8Yt r4AdBXgLdxfMloaqLR5rD8kcxE7lBxv+VRobflSFrKrsYc2ZNS8rjcpqrlGmumGu3HeGYi 2AuqHXqGDxKmUWiykFJ16Y+USVhFNiQuhs6UIgDMqS2pP1NxnYnytOuSKQe5Sg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=RUBQ1xRG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676522362; 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=E/nicBCK7b3L5DmKfveBEFHk4DpOzJMzMp6EB+2uTC0=; b=GsP9g8dHXyHi9va+XXI4FKaaMXzXhMM6r0hQstTtBx/X2PKoZYDFvi4tz39Gc9fNiODNbq nB4LvKfch+zVtzpDYPpMjhySETnvMCwC0IdFM4hkZZTnNXH7be8qW+87l0xJwuLQaiOLlr kj2bvLanOcx8q5IaFjQkTvgNhzNFJ7In5zhNNVuwx9/aoK/Z3bFOxxi0UqDokmz0rcYeZd NbhAGZIgOl1ozYJAnMMQfX6wE+bt/GPbIfoiYVjQDhCI6CAw+gcTJXKKM6hfcrFNdD3xSn sUlhQ9r1ktjEnPfgYXi52xe3vEZkeek1z7ue7u2K5jElZ+FgS0Fyoiwjkf/DtQ== X-Migadu-Scanner: scn1.migadu.com X-Spam-Score: 1.48 X-Migadu-Queue-Id: B83FB1EAA8 X-Migadu-Spam-Score: 1.48 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=RUBQ1xRG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-TUID: 83xc0kQVLJUT 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. --- 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, 98 insertions(+), 35 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index a578142967..9492d9a26a 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -679,9 +679,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) @@ -1303,9 +1303,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 @@ -1555,35 +1555,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) "Return a package for PROJECT, a symbol (either icecat or icedove). It assumes the %PROJECT-VERSION, PROJECT-SOURCE and %PROJECT-LOCALES variables @@ -1705,9 +1676,101 @@ (define (find-file dir name) associated with their name.")) (license license:mpl2.0)))) -(define-public icecat-l10n (make-l10n-package 'icecat)) +(define icecat-l10n (make-l10n-package 'icecat)) + +(define icedove-l10n (make-l10n-package 'icedove)) + +;;; 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) + (let ((base (module-ref (current-module) + (symbol-append project '-minimal))) + (l10n-package (module-ref (current-module) + (symbol-append project '-l10n))) + (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)) + +(define-public icedove (make-mozilla-with-l10n 'icedove)) -(define-public icedove-l10n (make-l10n-package 'icedove)) +(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 -- 2.39.1