From patchwork Mon Sep 11 09:08:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 53720 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 27CFB27BBEA; Mon, 11 Sep 2023 10:10:15 +0100 (BST) 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,SPF_HELO_PASS 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 05FAE27BBE2 for ; Mon, 11 Sep 2023 10:10:14 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfcvk-0005VF-QB; Mon, 11 Sep 2023 05:10:04 -0400 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 1qfcvh-0005Uc-JC for guix-patches@gnu.org; Mon, 11 Sep 2023 05:10:01 -0400 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 1qfcvg-0006bw-Ax for guix-patches@gnu.org; Mon, 11 Sep 2023 05:10:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qfcvh-0003y2-QT; Mon, 11 Sep 2023 05:10:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65745] [PATCH v2] gnu: yelp: Provide dependencies to display "man:" URIs. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, rg@raghavgururajan.name, guix-patches@gnu.org Resent-Date: Mon, 11 Sep 2023 09:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65745 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65745@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Luis Felipe , Liliana Marie Prikler , Maxim Cournoyer , Raghav Gururajan X-Debbugs-Original-Xcc: Liliana Marie Prikler , Maxim Cournoyer , Raghav Gururajan Received: via spool by 65745-submit@debbugs.gnu.org id=B65745.169442334915185 (code B ref 65745); Mon, 11 Sep 2023 09:10:01 +0000 Received: (at 65745) by debbugs.gnu.org; 11 Sep 2023 09:09:09 +0000 Received: from localhost ([127.0.0.1]:52125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfcuq-0003wr-IA for submit@debbugs.gnu.org; Mon, 11 Sep 2023 05:09:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35076) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfcum-0003wL-H7 for 65745@debbugs.gnu.org; Mon, 11 Sep 2023 05:09:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qfcub-0006TO-4e; Mon, 11 Sep 2023 05:08:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=QIA8BGXWt/Gfeo2Kvn5zJJyQJEGkrx6ymaVTnXc+15s=; b=quBUqUM6O7UnrLXoRu2A YOWTyDgRlE7YI5PFPea9dIyNF32QLdGHkbdQEr0m0hG/SvIi9I0G4SvdvJu8p0FmKqObcdlU7PiiA hDy2ti/e43Ur81hPxp6jcNNEkQ3D8RnSfKL/y9quCRI+8wDY/g8lxT8Rfoq77syZ8tqsSSOIUF5WL 9jfb2oBBqypjfO3QD6y1ipx459dcghi3/KoeVmPmCo1HfMR6WmZGLowThqHVfIQPHIfIuDEjNjqMF a19EXPy9kazxljSYCvNXdv5QLr4UTdcSzvgxEL2CKY21oXsC4kp1VTodBNCJTUzKWjAPf0CpDPRq8 +RSkzjAd+Xz5/Q==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Mon, 11 Sep 2023 11:08:38 +0200 Message-ID: <8bafadb0d4f4f3b1d1912c710f40f2ddd1a17cfd.1694423163.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <87wmx5mgjd.fsf@gmail.com> References: <87wmx5mgjd.fsf@gmail.com> 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 Previously a command like the following one would fail to display the expected man page: guix shell yelp coreutils -C \ --expose=/tmp/.X11-unix --expose=/run/user \ --expose=/var/run/dbus --expose=/etc/machine-id -E ^DISPLAY -- \ /bin/sh -c \ 'export MANPATH=$GUIX_ENVIRONMENT/share/man; echo $MANPATH; yelp man:ls' * gnu/packages/gnome.scm (yelp)[arguments]: New field. [inputs]: Add ‘man-db’ and ‘groff-minimal’. Reported-by: Luis Felipe --- gnu/packages/gnome.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) Hi! Here's an improved and more reasonable version. There's still an issue we should fix in 'man-db' but I ran out of time before I could find the remaining place where 'man' searches for 'groff' in $PATH. Ludo'. base-commit: a4c35c607cfd7d6b0bad90cfcc46188d489e1754 diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 3b80692e90..36fe1a80a1 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -142,6 +142,7 @@ (define-module (gnu packages gnome) #:use-module (gnu packages geo) #:use-module (gnu packages gperf) #:use-module (gnu packages graphviz) + #:use-module (gnu packages groff) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) @@ -7336,6 +7337,28 @@ (define-public yelp (base32 "0h9vf4fx056imjf8ibmn03wg1c3hniipy1nsm2jqi62lp1m19c95")))) (build-system glib-or-gtk-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'set-man-file-name + (lambda* (#:key inputs #:allow-other-keys) + ;; Invoke 'man' directly instead of searching $PATH. + (substitute* '("libyelp/yelp-man-parser.c" + "libyelp/yelp-uri.c") + (("\"man\"") + (string-append "\"" + (search-input-file inputs "bin/man") + "\"")) + (("G_SPAWN_SEARCH_PATH") + "0")))) + (add-after 'install 'help-man-find-its-dependencies + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; XXX: Currently 'man' looks for 'groff' in $PATH in one + ;; case. This should be fixed in 'man-db' proper. + (wrap-program (string-append (assoc-ref outputs "out") + "/bin/yelp") + `("PATH" ":" prefix + (,(dirname (search-input-file inputs "bin/groff")))))))))) (native-inputs (list `(,glib "bin") ; for glib-genmarshal, etc. intltool @@ -7347,6 +7370,8 @@ (define-public yelp (list gsettings-desktop-schemas libhandy libxslt + man-db ;for URIs like "man:ls" + groff-minimal ;ditto sqlite webkitgtk yelp-xsl))