From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 AC7aC9cTKGOz9gAAbAwnHQ (envelope-from ) for ; Mon, 19 Sep 2022 09:01:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GBnIC9cTKGPMxgAAauVa8A (envelope-from ) for ; Mon, 19 Sep 2022 09:01:43 +0200 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 A936C2BDFE for ; Mon, 19 Sep 2022 09:01:42 +0200 (CEST) Received: from localhost ([::1]:42550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaAmj-00065D-9e for larch@yhetil.org; Mon, 19 Sep 2022 03:01:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaAl8-00060Y-Cb for guix-patches@gnu.org; Mon, 19 Sep 2022 03:00:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52976) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oaAl8-0004WP-29 for guix-patches@gnu.org; Mon, 19 Sep 2022 03:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oaAl7-0003qg-Tk for guix-patches@gnu.org; Mon, 19 Sep 2022 03:00:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57927] [PATCH] gnu: source-highlight: Fix lesspipe file name and use gexps. Resent-From: kiasoc5 Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 19 Sep 2022 07:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57927 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57927@debbugs.gnu.org Cc: kiasoc5 X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166357077014720 (code B ref -1); Mon, 19 Sep 2022 07:00:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Sep 2022 06:59:30 +0000 Received: from localhost ([127.0.0.1]:52054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaAkb-0003pL-PV for submit@debbugs.gnu.org; Mon, 19 Sep 2022 02:59:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:52344) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaAkY-0003pC-Cx for submit@debbugs.gnu.org; Mon, 19 Sep 2022 02:59:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaAkX-0005Q6-QE for guix-patches@gnu.org; Mon, 19 Sep 2022 02:59:26 -0400 Received: from knopi.disroot.org ([178.21.23.139]:47310) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaAkV-0004Qt-De for guix-patches@gnu.org; Mon, 19 Sep 2022 02:59:25 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id ACFAD4A02B; Mon, 19 Sep 2022 08:59:20 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3nbAY-jnISs8; Mon, 19 Sep 2022 08:59:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1663570757; bh=+ZzwRxgB/86xLfWBjHHJp8lvnrVtvI4DQbf9gccBEgM=; h=From:To:Cc:Subject:Date; b=Bi1pO5/FRriWvcwR1q23o0I5qnvmvqLahuhNM+OuXGHT1aKpPMv+S9QTEk4F5AscI IVOgwQPjpAo9pIY9rDiPGDoEpcRkB5EkyGnRof+UJ5QJ4pSwLvPd3oh4WfIoJZeDGj A/3EFzY8TZXQZuhbxFt2U5DloJxVW9KOEQXJaqNSOSTCkVKLwu0lseVszbbQAQJqkr ptShsj0cM5dL6SCHt72NhmFFzfOq8mByJ9ja0+zrQt3o+b7+O3jhrfALiYYZlPTTzQ 8JbA1ZY9BSrkuwmfGnXEKeqrEufkyPaR2O1IeH38uSYhJLU1ARhlzHPW8Mao/cp++x muLish0gAUpsQ== Date: Mon, 19 Sep 2022 02:57:30 -0400 Message-Id: <29d55f693128126558e2e3e0a030194453312187.1663570649.git.kiasoc5@disroot.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.21.23.139; envelope-from=kiasoc5@disroot.org; helo=knopi.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: kiasoc5 X-ACL-Warn: , kiasoc5 via Guix-patches From: kiasoc5 via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663570902; h=from:from:sender:sender:reply-to: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=QqvqdgW4lZyqeqsEYpA0CdXaLfYkfXPa/UjYLAFhmyc=; b=NzeAWetxzCv3gBKb5+l8ox9i3W5ZoZ7XYv63fiYY+uyPQTsNKmmv8HLLQvQFCs8X3KpR8e gxtiTnqENBKwn3AgloKKRsKPPIX/Qqxh/V8Rj3PkRt4HgDEunGpySIJGmyOzZQH7AJjZHK 5W5JoewZJzol1N074eeZiTBss0vVqbFbYuPmxCRdcg7eewiHZkOnTBgcLf3WONPjKHe+L4 9WYMOvXWUJ2xZmnLRLpnezEcjwj0cHXAi/DKeUYIxCfxGau/L+hhOGa3F2ij4EEtbNoER4 VRZVik0OH3AsTlivfQ+4nJ0tKbod2wdbXGPDLWMraSUyZhr5stzthAJ+b5tCrw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663570902; a=rsa-sha256; cv=none; b=TXC9cofLAgAumVam/O7kI/J+LVF9ZNWRrjE0hZX54OXgl+TlHmuZjJYZyFI9MHF1XX5Wmq JL3yleEBeQMPEHXIT67YHYqPpP/nMfvq73PA0nm2Lm9SIe662cWFG6XQ0dYZa0x4vGFyjz tSZFnBgikcGiHW0PqQ8sYzoAQbPVaQnPOfvcYa/mYPsbQacKVHO0x+WcOkA/TYbyRuH+wz DfhN8bckImsO4ZVZe5J9gC+8KnfFuGvFDz3M9Dr1LkrzlaJF6VkBxcQJeSJH2q07QfsmQO BiJ96S8Q1PQGAbTgD7hPSkPhhj7zVB5kcY/7hbRRyRK8kOK1NbdC3+BO5SKs2g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b="Bi1pO5/F"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.14 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b="Bi1pO5/F"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A936C2BDFE X-Spam-Score: -3.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: WWwZAzn8EUZ1 This fixes src-hilite-lesspipe.sh so that lesspipe.sh is called instead of lesspipe. * gnu/packages/pretty-print.scm (source-highlight): [arguments]: Use gexps, remove trailing #ts. [phases]: Add phase to make src-highlight-lesspipe.sh work. --- gnu/packages/pretty-print.scm | 70 ++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index 9745a9ba10..13108fe7db 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -32,6 +32,7 @@ (define-module (gnu packages pretty-print) #:use-module (guix download) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) + #:use-module (guix gexp) #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages bison) @@ -276,40 +277,41 @@ (define-public source-highlight (list boost)) (native-inputs (list bison flex)) - (arguments - `(#:configure-flags - (list (string-append "--with-boost=" - (assoc-ref %build-inputs "boost"))) - #:parallel-tests? #f ;There appear to be race conditions - #:phases - (modify-phases %standard-phases - ,@(if (%current-target-system) - ;; 'doc/Makefile.am' tries to run stuff even when - ;; cross-compiling. Explicitly skip it. - ;; XXX: Inline this on next rebuild cycle. - `((add-before 'build 'skip-doc-directory - (lambda _ - (substitute* "Makefile" - (("^SUBDIRS = (.*) doc(.*)$" _ before after) - (string-append "SUBDIRS = " before - " " after "\n"))) - #t))) - '()) - (add-before 'check 'patch-test-files - (lambda _ - ;; Unpatch shebangs in test input so that source-highlight - ;; is still able to infer input language - (substitute* '("tests/test.sh" - "tests/test2.sh" - "tests/test.tcl") - (((string-append "#! *" (which "sh"))) "#!/bin/sh")) - ;; Initial patching unrecoverably removes whitespace, so - ;; remove it also in the comparison output. - (substitute* '("tests/test.sh.html" - "tests/test2.sh.html" - "tests/test.tcl.html") - (("#! */bin/sh") "#!/bin/sh")) - #t))))) + (arguments + (list #:configure-flags + #~(list (string-append "--with-boost=" (assoc-ref %build-inputs "boost"))) + #:parallel-tests? #f ;There appear to be race conditions + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'rename-lesspipe-to-lesspipe.sh.in + (lambda _ + (substitute* "src/src-hilite-lesspipe.sh.in" + (("lesspipe") "lesspipe.sh")))) + #$@(if (%current-target-system) + ;; 'doc/Makefile.am' tries to run stuff even when + ;; cross-compiling. Explicitly skip it. + ;; XXX: Inline this on next rebuild cycle. + #~((add-before 'build 'skip-doc-directory + (lambda _ + (substitute* "Makefile" + (("^SUBDIRS = (.*) doc(.*)$" _ before after) + (string-append "SUBDIRS = " before + " " after "\n")))))) + '()) + (add-before 'check 'patch-test-files + (lambda _ + ;; Unpatch shebangs in test input so that source-highlight + ;; is still able to infer input language + (substitute* '("tests/test.sh" + "tests/test2.sh" + "tests/test.tcl") + (((string-append "#! *" (which "sh"))) "#!/bin/sh")) + ;; Initial patching unrecoverably removes whitespace, so + ;; remove it also in the comparison output. + (substitute* '("tests/test.sh.html" + "tests/test2.sh.html" + "tests/test.tcl.html") + (("#! */bin/sh") "#!/bin/sh"))))))) (home-page "https://www.gnu.org/software/src-highlite/") (synopsis "Produce a document with syntax highlighting from a source file") (description base-commit: 25adb336bcb0188a92ecbe6b9c1d9d3e3a8b59e4 -- 2.37.2