[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
11/11: gnu: source-highlight: Fix lesspipe file name and use gexps.
From: |
guix-commits |
Subject: |
11/11: gnu: source-highlight: Fix lesspipe file name and use gexps. |
Date: |
Tue, 27 Sep 2022 05:17:28 -0400 (EDT) |
mothacehe pushed a commit to branch master
in repository guix.
commit 74f07348e99a3495964a8bbb8da83d27ecad656e
Author: kiasoc5 <kiasoc5@disroot.org>
AuthorDate: Mon Sep 19 02:57:30 2022 -0400
gnu: source-highlight: Fix lesspipe file name and use gexps.
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.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
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 @@
#: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 @@ to @code{IOStreams}.")
(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
- 02/11: gnu: blueman: Update to 2.3.2., (continued)
- 02/11: gnu: blueman: Update to 2.3.2., guix-commits, 2022/09/27
- 03/11: gnu: vim-nerdcommenter: Update to 2.6.0, use G-expressions., guix-commits, 2022/09/27
- 08/11: gnu: font-lxgw-wenkai: Update to 1.245., guix-commits, 2022/09/27
- 06/11: gnu: font-chiron-sung-hk: Update to 1.006., guix-commits, 2022/09/27
- 05/11: gnu: podman: Update to 4.2.1., guix-commits, 2022/09/27
- 01/11: gnu: pipewire-0.3: Add man pages., guix-commits, 2022/09/27
- 04/11: gnu: matterbridge: Update to 1.25.2., guix-commits, 2022/09/27
- 07/11: gnu: font-chiron-hei-hk: Update to 2.504., guix-commits, 2022/09/27
- 09/11: gnu: font-lxgw-wenkai-tc: Update to 0.922., guix-commits, 2022/09/27
- 10/11: gnu: gnome-shell-extension-clipboard-indicator: Update to 42., guix-commits, 2022/09/27
- 11/11: gnu: source-highlight: Fix lesspipe file name and use gexps.,
guix-commits <=