aboutsummaryrefslogtreecommitdiff
path: root/gn/packages/javascript.scm
diff options
context:
space:
mode:
authorAlexander_Kabui2024-08-14 15:49:48 +0300
committerMunyoki Kilyungi2024-08-15 12:18:47 +0300
commitef055da78f562aa2e586b4f1fb68b728e3fa3569 (patch)
tree617af8184ae0af613d7eef1fa76ea250266e2491 /gn/packages/javascript.scm
parent822f9ee8dd574660d1336416a60cceecf7676ff7 (diff)
downloadguix-bioinformatics-ef055da78f562aa2e586b4f1fb68b728e3fa3569.tar.gz
gn: javascript: Add javascript-diff2html.
* gn/packages/javascript.scm (javascript-diff2html): New package. Reviewed-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn/packages/javascript.scm')
-rw-r--r--gn/packages/javascript.scm30
1 files changed, 30 insertions, 0 deletions
diff --git a/gn/packages/javascript.scm b/gn/packages/javascript.scm
index ca1c7cf..207c902 100644
--- a/gn/packages/javascript.scm
+++ b/gn/packages/javascript.scm
@@ -2177,3 +2177,33 @@ for developing fast and powerful web interfaces.")
(description
"JavaScript plugin for finding links in plain-text and highlightinging links within strings that contain HTML markup.")
(license license:expat)))
+
+(define-public javascript-diff2html
+ (package
+ (name "javascript-diff2html")
+ (version "3.4.48")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://cdn.jsdelivr.net/npm/diff2html@" version
+ "/bundles/js/diff2html.min.js"))
+ (sha256
+ (base32 "02sqk3i5l1viw2dq2c2z4ja9mgsn9cks9l4ln1fsw4y91fw1m6n5"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder (begin
+ (use-modules (guix build utils))
+ (let* ((source (assoc-ref %build-inputs "source"))
+ (out (assoc-ref %outputs "out"))
+ (targetdir (string-append out
+ "/share/genenetwork2/javascript/diff2html")))
+ (mkdir-p targetdir)
+ (copy-file source
+ (string-append targetdir "/diff2html.min.js"))))))
+ (native-inputs `(("source" ,source)))
+ (home-page "https://diff2html.xyz/")
+ (synopsis "Diff parser and pretty html generator.")
+ (description
+ "diff2html generates pretty HTML diffs from git diff or unified diff output.")
+ (license license:expat)))