From cd3bd6af0728991e69564a94bce34fb7ed62c41c Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Wed, 14 Aug 2024 15:49:49 +0300 Subject: gn: javascript: Add javascript-diff2html-ui. * gn/packages/javascript.scm (javascript-diff2html-ui): New package. Reviewed-by: Munyoki Kilyungi --- gn/packages/javascript.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gn/packages') diff --git a/gn/packages/javascript.scm b/gn/packages/javascript.scm index 207c902..ba27e4c 100644 --- a/gn/packages/javascript.scm +++ b/gn/packages/javascript.scm @@ -2207,3 +2207,28 @@ for developing fast and powerful web interfaces.") (description "diff2html generates pretty HTML diffs from git diff or unified diff output.") (license license:expat))) + +(define-public javascript-diff2html-ui + (package + (inherit javascript-diff2html) + (name "javascript-diff2html-ui") + (version "3.4.48") + (source + (origin + (method url-fetch) + (uri (string-append "https://cdn.jsdelivr.net/npm/diff2html@" version + "/bundles/css/diff2html.min.css")) + (sha256 + (base32 "0y05qm8si1nd5l9q67il36p6q1xkbffrzlp7q6pli9sraghlmh10")))) + (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/diff2html")) + (source (assoc-ref %build-inputs "source"))) + (mkdir-p targetdir) + (copy-file source + (string-append targetdir "/diff2html.min.css")))))) + (native-inputs `(("source" ,source))))) -- cgit v1.2.3