From 1347daa00f7da4de18065513ff0a79cbd5136d15 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 26 Sep 2019 11:57:27 -0500 Subject: gn: Add javascript-parsley, js-parsley. * gn/packages/javascript.scm (javascript-parsley, js-parsley): New variables. --- gn/packages/javascript.scm | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'gn/packages') diff --git a/gn/packages/javascript.scm b/gn/packages/javascript.scm index a6ee543..646683a 100644 --- a/gn/packages/javascript.scm +++ b/gn/packages/javascript.scm @@ -884,3 +884,44 @@ browser compatibility, including legacy browsers. (license (list license:gpl2+ license:lgpl2.1+ license:mpl1.1)))) ; Any of these three + +(define-public javascript-parsley + (package + (name "javascript-parsley") + (version "2.9.1") ; May 28, 2019 + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/guillaumepotier/Parsley.js") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0kb2hmnj9rry68qqmj0m4wjk0syrb0i3c2n31sr24y9m8pdr8nck")))) + (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/parsley")) + (source (assoc-ref %build-inputs "source")) + (dist (string-append source "/dist"))) + (copy-recursively dist targetdir))))) + (native-inputs `(("source" ,source))) + (home-page "https://parsleyjs.org/") + (synopsis "Javascript validation library") + (description + "Parsley is a javascript library which allows you to write in English your +requirements inside your form HTML tags. It can also automatically detects +your forms' modifications and adapts its validation accordingly.") + (license license:expat))) + +(define-public js-parsley + (package + (inherit javascript-parsley) + (name "js-parsley") + (arguments `(#:javascript-files '("dist/parsley.js"))) + (build-system minify-build-system))) -- cgit v1.2.3