summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEric Bavier <bavier@member.fsf.org>2015-03-12 11:21:28 -0500
committerEric Bavier <bavier@member.fsf.org>2015-03-12 15:55:57 -0500
commit11f4c54206793a79d0969af1d22d6f0f898748c1 (patch)
tree8a15a74fb856079aa7334ae87e5b64f057146a84 /gnu/packages
parent95aa068e44d585ba84f6b02add0b6b791b135f2e (diff)
downloadguix-11f4c54206793a79d0969af1d22d6f0f898748c1.tar.gz
gnu: Add JSON-MaybeXS.
* gnu/packages/web.scm (perl-json-maybexs): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/web.scm25
1 files changed, 25 insertions, 0 deletions
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 736b2157b4..255b7f1dd0 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -957,6 +957,31 @@ select or poll.")
     (license (package-license perl))
     (home-page "https://github.com/noxxi/p5-io-socket-ssl")))
 
+(define-public perl-json-maybexs
+  (package
+    (name "perl-json-maybexs")
+    (version "1.003003")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/E/ET/ETHER/"
+                           "JSON-MaybeXS-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0q21wzz87drrvblxcm2py8fcvkzwx1hxzfybynz8ln7wv66vbx3f"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-test-without-module" ,perl-test-without-module)))
+    (inputs
+     `(("perl-cpanel-json-xs" ,perl-cpanel-json-xs)))
+    (home-page "http://search.cpan.org/dist/JSON-MaybeXS")
+    (synopsis "Cpanel::JSON::XS with fallback")
+    (description "This module first checks to see if either Cpanel::JSON::XS
+or JSON::XS is already loaded, in which case it uses that module.  Otherwise
+it tries to load Cpanel::JSON::XS, then JSON::XS, then JSON::PP in order, and
+either uses the first module it finds or throws an error.")
+    (license (package-license perl))))
+
 (define-public perl-libwww
   (package
     (name "perl-libwww")