From 35f3f75aa945728868a5df1bfe0164cd917e9d4b Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Tue, 7 Nov 2023 16:30:46 +0300 Subject: gn: javascript: Add javascript-marked-highlight. * gn/packages/javascript.scm (javascript-marked-highlight): New package. Reviewed-by: Munyoki Kilyungi --- gn/packages/javascript.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'gn') diff --git a/gn/packages/javascript.scm b/gn/packages/javascript.scm index 3d4c7e5..05706ce 100644 --- a/gn/packages/javascript.scm +++ b/gn/packages/javascript.scm @@ -1946,3 +1946,33 @@ vector graphics.") (description "A low-level markdown compiler for parsing markdown without caching or blocking for long periods of time.") (license license:expat))) + +(define-public javascript-marked-highlight + (package + (name "javascript-marked-highlight") + (version "2.0.6") + (source + (origin + (method url-fetch) + (uri (string-append "https://cdn.jsdelivr.net/npm/marked-highlight@" version "/lib/index.umd.min.js")) + (sha256 + (base32 + "087qcy77fm3r7dl6w0mxsqygmdpimrmksw78r4wkkkjdx9x9dshf")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let* ((out (assoc-ref %outputs "out")) + (targetdir + (string-append out "/share/genenetwork2/javascript/marked")) + (source (assoc-ref %build-inputs "source"))) + (mkdir-p targetdir) + (copy-file source (string-append targetdir "/marked-highlight.js")))))) + (native-inputs `(("source" ,source))) + (home-page "https://github.com/markedjs/marked-highlight") + (synopsis "Highlight code blocks.") + (description + "Add code highlighting to marked.") + (license license:expat))) -- cgit v1.2.3