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 kJQvJLZ572MQHQEAbAwnHQ (envelope-from ) for ; Fri, 17 Feb 2023 13:57:26 +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 AOxUI7Z572OnYwAAG6o9tA (envelope-from ) for ; Fri, 17 Feb 2023 13:57:26 +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 35FDE10C8D for ; Fri, 17 Feb 2023 13:57:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT0IV-0003gM-9d; Fri, 17 Feb 2023 07:57:07 -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 1pT0IR-0003Iz-LS for bug-guix@gnu.org; Fri, 17 Feb 2023 07:57:03 -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 1pT0IR-0000b2-Bc for bug-guix@gnu.org; Fri, 17 Feb 2023 07:57:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pT0IR-0001tD-7Y for bug-guix@gnu.org; Fri, 17 Feb 2023 07:57:03 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#32026: [PATCH v3 07/11] gnu: Add language packs to icecat and icedove. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 17 Feb 2023 12:57:03 +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.16766385707157 (code B ref 32026); Fri, 17 Feb 2023 12:57:03 +0000 Received: (at 32026) by debbugs.gnu.org; 17 Feb 2023 12:56:10 +0000 Received: from localhost ([127.0.0.1]:38787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT0Ha-0001rG-2S for submit@debbugs.gnu.org; Fri, 17 Feb 2023 07:56:10 -0500 Received: from mail-qt1-f170.google.com ([209.85.160.170]:45949) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT0HS-0001oz-6b for 32026@debbugs.gnu.org; Fri, 17 Feb 2023 07:56:03 -0500 Received: by mail-qt1-f170.google.com with SMTP id d10so712045qtr.12 for <32026@debbugs.gnu.org>; Fri, 17 Feb 2023 04:56:02 -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=g/RDFL6cRtkLmLkEsNSGBBCYqC4aAyywO1hAG5HFASs=; b=Mxzkc3hmHlDXl+K/1Pyq5Z24RsSiXE/eBHp2n+ONQdSQc6A4ZCNWW4zOYxoIY6PZ50 C0+e6rovGf3v3hiJjTejGrSvuMUVWINPUbY9sjCX2aKik9Cm9hO4Hor8wQzx+JYQIe4J Ot4l7ilmz5e8Knsss6nBb9lwVRauMFqLD2vp1fp52vLU1ltMvm0dYQbq+nIzaGB/0UU7 lVIf49JdPO9LTmupsCUV+W8H56KSXYkbwu44g++VZaKEqgy1fIo5Ay4TD3S0K540YX1h 25LFAtlv/LFQ706p0TLIZ89Jj1uu+fGwCy14xYTnDyDDt9Ry/sStFJWGCkGO595H0MzX N4Aw== 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=g/RDFL6cRtkLmLkEsNSGBBCYqC4aAyywO1hAG5HFASs=; b=3S2lt6JvRMjflgnxBm98x/mAdEvggZ7M0nOTldxyGGMdkD/FuGWiwOl2pJIFfnLXVV NgnMFZDXxbzEY2FA/A3m4ZxUGiJJ01VBcF04kI0livi2EQE71g0F53pIHxrmksWnYArP aPIs2+nelcgRj5onFvrQtUYYlCMFJUzbk4H9nkqwCBLf9/+hOTMN5lSfI3CGXM+2vhhX UgxIeiLFtSd1ZEds996IWkw3bypmE2vD9UrZSJd1JWdoYynnfF2A7HjR+gucVlqY/0O/ X65G53WhA9MIh5ZgFmlhXJ+/v0c54xC9bMEeujwsL/GOc4RO6GNvcj3FGbApCnPJqN21 NK/Q== X-Gm-Message-State: AO0yUKWN4nlNXWLQHq9VhxkFYaPAAEJFnwoUWJQ6vF4ONOZvy9fs1xGE 0//SS+fQ5JwvfVt7B2jbNK3cZRxp3U6CfFtK X-Google-Smtp-Source: AK7set+M46QET3ljdyAgDN13JK1vrx7VBWkHbuY0+v7IIVeN5yO52bQvfA9SpsjfE1Stv2FNykSDZg== X-Received: by 2002:a05:622a:198c:b0:3b9:a441:37f4 with SMTP id u12-20020a05622a198c00b003b9a44137f4mr1506609qtc.52.1676638556632; Fri, 17 Feb 2023 04:55:56 -0800 (PST) Received: from localhost.localdomain (dsl-157-123.b2b2c.ca. [66.158.157.123]) by smtp.gmail.com with ESMTPSA id f17-20020ac80691000000b003b9b48cdbe8sm3176026qth.58.2023.02.17.04.55.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 04:55:56 -0800 (PST) From: Maxim Cournoyer Date: Fri, 17 Feb 2023 07:55:34 -0500 Message-Id: <20230217125539.24467-7-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230217125539.24467-1-maxim.cournoyer@gmail.com> References: <20230217125539.24467-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=1676638646; a=rsa-sha256; cv=none; b=PEs60w1Xe5EgsiTkYUsNTP8+PDLKiO1+/AUO4xgLMZOT6XVs2KP8fvBOL4On4lGu+vpBsE XNaRQieVW71VQUAW7e7UdGZ8qqx3oh4q463d7XuFmSyncCT/GUSu/DwB4ATy0vR/6pO1pM CUj716kc2xwWS6LzathoG5Xjv9OqKKNSK6R9EDvw8dcPSg8wbb/CcyQ6E4+O45eX/5hoGv o0Q6Q+G7NpaBiEUzO5D2zuODx3ZL9o/2RlZaVos9td3CFoHVid0McC7Tx1IVbl6SYu6FAB CxE71ZyZe8OX4LaQAntfRPhKkVMEsH2YTV4cDcQWIHAE/SFk69ahGKp09dDDWg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Mxzkc3hm; 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=1676638646; 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=g/RDFL6cRtkLmLkEsNSGBBCYqC4aAyywO1hAG5HFASs=; b=ahKAAylgz3ue+K4lnkcHG64xFvYTt9Ey2bQ7JKk+yOYZ1ljcQfmV46ke4NfrzMANJK7gkH g/xgjAUPMLmE33t0nKmKivYNBONYNaU57Rmd0wtpTmQhZ9CJ2UncSzGOfMTQjgwr5Uauq3 Y7gwLbbKLd6X21KCYrdvNIs3tYZpSfnqHya2ssVhhMlMV4Op1x4zM5Qinf+L845veyK6YU yJhvRu/3xpBI2v3mc6x4G/9jqm/W2Jgw3fNDGCvIRdzhYg4m3donlVmpZ2Wj6QzopP7ODZ 5ab8EYsVhjnIVdHq8jfUHi6Nff1XUh2nbjtJvqfbJZ43HQan7gAH3jgWxKy8GQ== X-Migadu-Spam-Score: -0.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Mxzkc3hm; 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-Migadu-Queue-Id: 35FDE10C8D X-Migadu-Scanner: scn1.migadu.com X-Spam-Score: -0.03 X-TUID: p6/gJwdjcQ9i 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 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 3ece3f057c..02493b9aff 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 version source locales) "Return a package for PROJECT, a symbol (either icecat or icedove), with their corresponding VERSION, SOURCE and LOCALES variables." @@ -1706,6 +1677,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