From 612fa6ca7f5c78a8e652562306f6c93f12a6de00 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Mon, 18 Mar 2024 18:20:05 +0300 Subject: 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 --- gn/packages/javascript.scm | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) 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 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))) -- cgit v1.2.3