From e81228166e2349ded3d31d00642408ddb8a8d54e Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 29 Jul 2021 15:34:46 -0400 Subject: gnu: web: Move libyaml and libcyaml to (gnu packages serialization). Files to be adjusted were searched with the following command: $ git ls-files | xargs grep -l -E ',libc?yaml' | \ xargs grep -L '(gnu packages serialization)' * gnu/packages/web.scm (libyaml, libyaml+static, libcyaml): Move to... * gnu/packages/serialization.scm: ... here. --- gnu/packages/serialization.scm | 71 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) (limited to 'gnu/packages/serialization.scm') diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm index 8f292ae408..19fbafa338 100644 --- a/gnu/packages/serialization.scm +++ b/gnu/packages/serialization.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015, 2017, 2019, 2021 Ricardo Wurmus +;;; Copyright © 2015, 2017, 2019, 2020, 2021 Ricardo Wurmus ;;; Copyright © 2016 Lukas Gradl ;;; Copyright © 2016 David Craven ;;; Copyright © 2016, 2019, 2020 Marius Bakke @@ -10,6 +10,7 @@ ;;; Copyright © 2017 Nikita ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2018 Joshua Sierles, Nextjournal +;;; Copyright © 2020 Alexandros Theodotou ;;; ;;; This file is part of GNU Guix. ;;; @@ -333,6 +334,74 @@ that implements both the msgpack and msgpack-rpc specifications.") (inputs `(("lua" ,lua-5.2))))) +(define-public libyaml + (package + (name "libyaml") + (version "0.2.5") + (source + (origin + (method url-fetch) + (uri (string-append "https://pyyaml.org/download/libyaml/yaml-" + version ".tar.gz")) + (sha256 + (base32 + "1x4fcw13r3lqy8ndydr3ili87wicplw2awbcv6r21qgyfndswhn6")))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) + (home-page "https://pyyaml.org/wiki/LibYAML") + (synopsis "YAML 1.1 parser and emitter written in C") + (description + "LibYAML is a YAML 1.1 parser and emitter written in C.") + (license license:expat))) + +(define-public libyaml+static + (package + (inherit libyaml) + (name "libyaml+static") + (arguments + '(#:configure-flags '("--enable-static"))))) + +(define-public libcyaml + (package + (name "libcyaml") + (version "1.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tlsa/libcyaml") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (patches (search-patches "libcyaml-libyaml-compat.patch")) + (sha256 + (base32 "0428p0rwq71nhh5nzcbapsbrjxa0x5l6h6ns32nxv7j624f0zd93")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list (string-append "PREFIX=" (assoc-ref %outputs "out")) + (string-append "CC=gcc")) + #:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (replace 'check + (lambda _ + (setenv "CC" "gcc") + (invoke "make" "test")))))) + (inputs + `(("libyaml" ,libyaml))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (synopsis "C library for reading and writing YAML") + (description + "LibCYAML is a C library written in ISO C11 for reading and writing +structured YAML documents. The fundamental idea behind CYAML is to allow +applications to construct schemas which describe both the permissible +structure of the YAML documents to read/write, and the C data structure(s) +in which the loaded data is arranged in memory.") + (home-page "https://github.com/tlsa/libcyaml") + (license license:isc))) + (define-public yaml-cpp (package (name "yaml-cpp") -- cgit v1.2.3