summary refs log tree commit diff
path: root/gnu/packages/serialization.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/serialization.scm')
-rw-r--r--gnu/packages/serialization.scm78
1 files changed, 67 insertions, 11 deletions
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index e24ef973b5..dc21dba10b 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -3,13 +3,14 @@
 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2016, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017 Corentin Bocquillon <corentin@nybble.fr>
 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
 ;;; Copyright © 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
+;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -31,6 +32,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix hg-download)
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix build-system cmake)
@@ -110,8 +112,7 @@ implement RPC protocols.")
              (let ((gcc (assoc-ref inputs  "gcc")))
                (setenv "CPLUS_INCLUDE_PATH"
                        (string-join
-                        (cons* (string-append (assoc-ref inputs "libcxx+libcxxabi")
-                                              "/include/c++/v1")
+                        (cons* (search-input-directory inputs "include/c++/v1")
                                ;; Hide GCC's C++ headers so that they do not interfere with
                                ;; the Clang headers.
                                (delete (string-append gcc "/include/c++")
@@ -418,16 +419,15 @@ in which the loaded data is arranged in memory.")
 (define-public jsoncpp
   (package
     (name "jsoncpp")
-    (version "1.9.2")
+    (version "1.9.4")
     (home-page "https://github.com/open-source-parsers/jsoncpp")
     (source (origin
               (method git-fetch)
               (uri (git-reference (url home-page) (commit version)))
               (file-name (git-file-name name version))
-              (patches (search-patches "jsoncpp-fix-inverted-case.patch"))
               (sha256
                (base32
-                "037d1b1qdmn3rksmn1j71j26bv4hkjv7sn7da261k853xb5899sg"))))
+                "0qnx5y6c90fphl9mj9d20j2dfgy6s5yr5l0xnzid0vh71zrp6jwv"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES"
@@ -444,6 +444,25 @@ preserve existing comment in unserialization/serialization steps, making
 it a convenient format to store user input files.")
     (license license:expat)))
 
+;; XXX: TODO(core-updates): Remove this package and apply the patch to the
+;; jsoncpp package.  This patch fixes the package version declared in the
+;; pkg-config file.
+(define-public jsoncpp-with-pkg-version
+  (package
+    (inherit jsoncpp)
+    (name "jsoncpp")
+    (version "1.9.4")
+    (home-page "https://github.com/open-source-parsers/jsoncpp")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference (url home-page) (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0qnx5y6c90fphl9mj9d20j2dfgy6s5yr5l0xnzid0vh71zrp6jwv"))
+              (patches
+               (search-patches "jsoncpp-pkg-config-version.patch"))))))
+
 ;; Tensorflow does not build with jsoncpp 1.8.x.  It is built with commit
 ;; 4356d9bba191e1e16ce7a92073cbf3e63564e973, which lies between version 1.7.2
 ;; and 1.7.3.
@@ -569,21 +588,23 @@ it is comparable to protobuf.")
 (define-public python-ruamel.yaml
   (package
     (name "python-ruamel.yaml")
-    (version "0.15.83")
+    (version "0.16.13")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "ruamel.yaml" version))
        (sha256
         (base32
-         "0p4i8ad28cbbbjja8b9274irkhnphhvhap3aym6yb8xfp1d72kpw"))))
+         "0hm9yg785f46bkrgqknd6fdvmkby9dpzjnm0b63qf0i748acaj5v"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-ruamel.yaml.clib" ,python-ruamel.yaml.clib)))
     (arguments
      `(;; TODO: Tests require packaging "ruamel.std.pathlib".
        #:tests? #f))
-    (home-page "https://bitbucket.org/ruamel/yaml")
+    (home-page "https://sourceforge.net/projects/ruamel-yaml/")
     (synopsis "YAML 1.2 parser/emitter")
     (description
      "This package provides YAML parser/emitter that supports roundtrip
@@ -593,8 +614,43 @@ and has round-trip loaders and dumpers.  It supports comments.  Block
 style and key ordering are kept, so you can diff the source.")
     (license license:expat)))
 
-(define-public python2-ruamel.yaml
-  (package-with-python2 python-ruamel.yaml))
+(define-public python-ruamel.yaml.clib
+  (package
+    (name "python-ruamel.yaml.clib")
+    (version "0.2.6")
+    (source
+      (origin
+        ;; pypi release code has cythonized code without corresponding source.
+        (method hg-fetch)
+        (uri (hg-reference
+               (url "http://hg.code.sf.net/p/ruamel-yaml-clib/code")
+               (changeset version)))
+        (file-name (string-append name "-" version "-checkout"))
+        (sha256
+         (base32
+          "05m3y7pjfbaarqbbgw1k6gs6cnnmxnwadjipxvw1aaaqk3s236cs"))
+        (modules '((guix build utils)))
+        (snippet
+         '(begin
+            (delete-file "_ruamel_yaml.c")))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f  ; This package is split from python-ruamel.yaml and
+                    ; depends on modules from it for the test suite.
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'sanity-check) ; Depends on python-ruamel.yaml
+         (add-after 'unpack 'cythonize-code
+           (lambda _
+             (invoke "cython" "_ruamel_yaml.pyx"))))))
+    (native-inputs
+     `(("python-cython" ,python-cython)))
+    (home-page "https://sourceforge.net/p/ruamel-yaml-clib/code/ci/default/tree")
+    (synopsis "C version of reader, parser and emitter for ruamel.yaml")
+    (description
+     "This package provides a C version of the reader, parser and emitter for
+@code{ruamel.yaml} derived from libyaml.")
+    (license license:expat)))
 
 (define-public python-cbor
   (package