From e1394034d6805456265f9e36ea6fa97904ea71df Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Wed, 14 Aug 2024 15:49:51 +0300 Subject: gn: javascript: Add javascript-highlight. * gn/packages/javascript.scm (javascript-highlight): New package. Reviewed-by: Munyoki Kilyungi --- gn/packages/javascript.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'gn/packages') diff --git a/gn/packages/javascript.scm b/gn/packages/javascript.scm index 3e1d558..eb9b9e4 100644 --- a/gn/packages/javascript.scm +++ b/gn/packages/javascript.scm @@ -2261,3 +2261,34 @@ for developing fast and powerful web interfaces.") (synopsis "A JavaScript text differencing implementation. ") (description "A JavaScript text differencing implementation.") (license license:bsd-3))) + +(define-public javascript-highlight + (package + (name "javascript-highlight") + (version "11.10.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/" version + "/highlight.min.js")) + (sha256 + (base32 "0cpdabxn5hbij3ci5gb769mi0qmmxvgqxi6d1x2ay1y4j2pgj7j7")))) + (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/highlight")) + (source (assoc-ref %build-inputs "source"))) + (mkdir-p targetdir) + (copy-file source + (string-append targetdir "/highlight.min.js")))))) + (native-inputs `(("source" ,source))) + (home-page "https://highlightjs.org/") + (synopsis "Highlight.js is a syntax highlighter written in JavaScript.") + (description + "JavaScript syntax highlighter with language auto-detection and zero dependencies.") + (license license:bsd-3))) -- cgit v1.2.3