From 935afdd36fee52fe3930991245ac67e48c0a00ff Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Wed, 10 Nov 2021 19:21:45 +0800 Subject: [PATCH 1/3] gnu: Add lowdown. * gnu/packages/markup.scm(lowdown): New variables. --- gnu/packages/markup.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/markup.scm b/gnu/packages/markup.scm index 368976bfde..4ec606f892 100644 --- a/gnu/packages/markup.scm +++ b/gnu/packages/markup.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2020 Marius Bakke ;;; Copyright © 2020 EuAndreh ;;; Copyright © 2021 Noisytoot +;;; Copyright © 2021 Zhu Zihao ;;; ;;; This file is part of GNU Guix. ;;; @@ -36,6 +37,7 @@ (define-module (gnu packages markup) #:use-module (guix utils) #:use-module (gnu packages compression) #:use-module (gnu packages) + #:use-module (gnu packages base) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -324,3 +326,35 @@ (define-public python-mistletoe swap out renderers for different output formats, without touching any of the core components.") (license expat))) + +(define-public lowdown + (package + (name "lowdown") + (version "0.10.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://kristaps.bsd.lv/lowdown/snapshots/lowdown-" + version ".tar.gz")) + (sha256 + (base32 "15v2kk4ffqw3n6y6n9plch4qcib3ynnhw0ih8wn2v9qgn4jssp5p")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;No test + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (invoke "./configure" + (string-append "PREFIX=" out) + (string-append "MANDIR=" out "/share/man")))))) + ;; the shared library of nix is linked with lowdown. + #:make-flags '("CFLAGS=-fPIC"))) + (native-inputs + `(("which" ,which))) + (home-page "https://kristaps.bsd.lv/lowdown") + (synopsis "Simple Markdown translator") + (description "Lowdown is a Markdown translator producing HTML5, +roff documents in the ms and man formats, LaTeX, gemini, and terminal output.") + (license isc))) -- 2.33.1