From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 mJWIDb7q6mPGlwAAbAwnHQ (envelope-from ) for ; Tue, 14 Feb 2023 02:58:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id oGdKDb7q6mOLgQAAauVa8A (envelope-from ) for ; Tue, 14 Feb 2023 02:58:22 +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 D32DD3AFF4 for ; Tue, 14 Feb 2023 02:58:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRkZF-00028J-Ap; Mon, 13 Feb 2023 20:57:13 -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 1pRkZB-00025p-VQ for bug-guix@gnu.org; Mon, 13 Feb 2023 20:57:10 -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 1pRkZ7-0003I4-8k for bug-guix@gnu.org; Mon, 13 Feb 2023 20:57:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pRkZ7-0007YP-4Z for bug-guix@gnu.org; Mon, 13 Feb 2023 20:57:05 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#32026: [PATCH 08/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: Tue, 14 Feb 2023 01:57:05 +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.167633980528934 (code B ref 32026); Tue, 14 Feb 2023 01:57:05 +0000 Received: (at 32026) by debbugs.gnu.org; 14 Feb 2023 01:56:45 +0000 Received: from localhost ([127.0.0.1]:52070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRkYm-0007Wa-9r for submit@debbugs.gnu.org; Mon, 13 Feb 2023 20:56:44 -0500 Received: from mail-qt1-f169.google.com ([209.85.160.169]:37685) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRkYf-0007VT-GR for 32026@debbugs.gnu.org; Mon, 13 Feb 2023 20:56:38 -0500 Received: by mail-qt1-f169.google.com with SMTP id m12so16092855qth.4 for <32026@debbugs.gnu.org>; Mon, 13 Feb 2023 17:56:37 -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=t9QdyA+wihyTJMMBmgbIX/HzUlMYg78Q80MTZdKCPsU=; b=pZnwCIcf/7RK50MYnz6LMYPSZQC5n96fWYPpmSj3MuTZLPDSMOtUzEVEOJuOKCN3E7 T/+sRCOi3NmD2zP+CUIDd9J3SndeMUdEldCZpm3BWmz1No90wr5zc+fp7SwcOI59nWZw +olX0nPIiT2EAbyfty+LGsUosBwDwxgv/DJLfRWk2PZC9ADiZ9aiJZdXCOqiO50JSbhV 8ugb/P2uFRbqeeQci2sVTDoRytLDx1AJZppDCm48Rs3g1CyU548CVrjdcKMaXLEUjEcy C9TDFvX/v212dKtBBKkqR7u7eVrnBf5ucJRV0gPPVbP8DoCmxsDcHKTxtfe8wnszxQx0 2PpQ== 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=t9QdyA+wihyTJMMBmgbIX/HzUlMYg78Q80MTZdKCPsU=; b=r9EtDBDFSgoBEBIxXLApSGyejKZA+3JWe94i+pnXYCvRLdw6D3eFlBTbV3ZMbcAgLG 5YaIDqA+3J+cu47AyhFT2azGptKBmzPyOsudcKz8gkVKyyqIFkcWL/BEmiwXukNme2UF 56VmLjkiqNRFir8XnCdKQvQVFFVHj2urxsECbjLqfUSMNiUYC9uRNimx5S2C9LACKBjd cc4gdLD9EFqDRA19yHePLpw6eWL3WN03FCMzBG6857baTqU1YVeSfiJiVQdqgflmdlsg d8dUiPJCKN2y9Do74XLUdEKKxJegfTyaQ4EY82tdSxy9qv7+xQ24I4Y+YLKMFTu1InEz Y/3Q== X-Gm-Message-State: AO0yUKVjjw2V4lCqODahClmH/t6Iu2FEa9BOjLm7MWkkwmTXQoMwoQzL 8St1cqqtEOCRbO/Fg83FNNse41rS5geb/zsh X-Google-Smtp-Source: AK7set9GQ3MW9AHWr4Y7h/nAQFaf8M2xgbcQv333ukBMa1u5NTLF5jJ+d2QqIbiq0PgzfsGQo7aBzA== X-Received: by 2002:a05:622a:11c4:b0:3b8:57a7:7836 with SMTP id n4-20020a05622a11c400b003b857a77836mr1016472qtk.46.1676339791880; Mon, 13 Feb 2023 17:56:31 -0800 (PST) Received: from localhost.localdomain (dsl-10-133-137.b2b2c.ca. [72.10.133.137]) by smtp.gmail.com with ESMTPSA id p205-20020a3742d6000000b0072a375c291csm10948798qka.30.2023.02.13.17.56.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 17:56:31 -0800 (PST) From: Maxim Cournoyer Date: Mon, 13 Feb 2023 20:55:53 -0500 Message-Id: <20230214015555.8643-9-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230214015555.8643-1-maxim.cournoyer@gmail.com> References: <20230214015555.8643-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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676339901; 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=t9QdyA+wihyTJMMBmgbIX/HzUlMYg78Q80MTZdKCPsU=; b=XZ+9IfIFGdZj8xNbJWV5V3DetgwDGIgNPbSuve5ix+nHNgvlQaSwPkne9C/9da6z3sRpMv M6IvNJpHFJOzpcWASQ/0UcG1Kh8OUj4sU6x/r/9PGpSubuQAev56XKZlcR0BLlCnd6Etaq RArDhY6Cum5L2bNOtNPM8WzLNbLaJpV0nvSeM9GbGgaohTLgLghkABLzUvJOc3EpLjoWJ7 dLD9TNlrq0t6MXRtPfFQefh20t5CVhuXS4Or3pz1jcp8JdC00rt+c1pT9TjoxphF3hs7XY 02VHvGq8HCqHXC6TDolMjRVqB0Y3UgtGzp/BryxqrCpB3fyfWsyhoPdroRkwVA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=pZnwCIcf; 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=1676339902; a=rsa-sha256; cv=none; b=HuPEc4ymosA3S6bqIktVILHaxSqjAaD8oy2F9AQMN4/6UJaNXF2itmeCTz5ycWmbGkmOQ5 K2MaYO5eEvffluDszb0vWurb3+bIBUtfetGXrbEvIg0Ubj4a/o0tV1FJS3USLlFzz0B3eH hm/1zHe/pmTiflw0l54Wr3qe/a2Gf3L8fFM6+By7x8S/Kd+xgjNfvQP7ar2D/C18HIl09t qVyLc80ez1PGY7lIMc2C4he4xedXkiDgNae12Yk96nrByWTWlD3885vPQp1xVj0kOlVQMs dE0t2dV0A1pil1vgqUHiV/nKtBN1eRNhFRGW9Tjpg2nVMTEMnzVPBnGnlmYoew== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -0.02 X-Spam-Score: -0.02 X-Migadu-Queue-Id: D32DD3AFF4 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=pZnwCIcf; 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: KXYSqORoT7pt 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. --- gnu/packages/gnuzilla.scm | 135 ++++++++++++++++++++++++++++---------- 1 file changed, 100 insertions(+), 35 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 2c83323c64..05f96c9622 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -680,9 +680,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) @@ -1304,9 +1304,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 @@ -1556,35 +1556,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 @@ -1706,9 +1677,103 @@ (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)))))) + (native-inputs '()) + (inputs '())))) + +(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