aboutsummaryrefslogtreecommitdiff
path: root/gn/packages
diff options
context:
space:
mode:
authorAlexander_Kabui2024-03-18 18:20:05 +0300
committerMunyoki Kilyungi2024-03-19 16:14:53 +0300
commit612fa6ca7f5c78a8e652562306f6c93f12a6de00 (patch)
tree7c0b1f3ee445e7a2bed063900dc7c0cbc5916689 /gn/packages
parent03c9a8bb9716b48bd853b3be54be4cbd50bcc615 (diff)
downloadguix-bioinformatics-612fa6ca7f5c78a8e652562306f6c93f12a6de00.tar.gz
gn: javascript: Add javascript-linkify, javascript-linkify-html.
* gn/packages/javascript.scm: (javascript-linkify): New package. (javascript-linkify-html): New package. Acked-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn/packages')
-rw-r--r--gn/packages/javascript.scm58
1 files changed, 58 insertions, 0 deletions
diff --git a/gn/packages/javascript.scm b/gn/packages/javascript.scm
index 349fa66..2d1668b 100644
--- a/gn/packages/javascript.scm
+++ b/gn/packages/javascript.scm
@@ -2044,3 +2044,61 @@ for developing fast and powerful web interfaces.")
(description "UIkit is a lightweight and modular front-end framework
for developing fast and powerful web interfaces.")
(license license:bsd-3)))
+
+(define-public javascript-linkify
+ (package
+ (name "javascript-linkify")
+ (version "4.1.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://cdn.jsdelivr.net/npm/linkifyjs@" version "/dist/linkify.min.js"))
+ (sha256
+ (base32
+ "1cy1z4gin0qx3a04fw2biszz1sgns0zc1zbr6sbkr2dicgqxjpf3"))))
+ (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/linkify"))
+ (source (assoc-ref %build-inputs "source")))
+ (mkdir-p targetdir)
+ (copy-file source (string-append targetdir "/linkify.min.js"))))))
+ (native-inputs `(("source" ,source)))
+ (home-page "https://linkify.js.org")
+ (synopsis "Find URLs and email addresses in plain text")
+ (description
+ "JavaScript plugin for finding links in plain-text and converting them to HTML <a> tags")
+ (license license:expat)))
+
+(define-public javascript-linkify-html
+ (package
+ (inherit javascript-linkify)
+ (name "javascript-linkify-html")
+ (version "4.1.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://cdn.jsdelivr.net/npm/linkify-html@" version "/dist/linkify-html.min.js"))
+ (sha256
+ (base32
+ "1s3l4wnyws9c9qjgp9ivl88inhyy28cjrhqjayb6hm1hzkasgj2j"))))
+ (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/linkify"))
+ (source (assoc-ref %build-inputs "source")))
+ (mkdir-p targetdir)
+ (copy-file source (string-append targetdir "/linkify-html.min.js"))))))
+ (native-inputs `(("source" ,source)))
+ (description
+ "JavaScript plugin for finding links in plain-text and highlightinging links within strings that contain HTML markup.")
+ (license license:expat)))