unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#39574] [PATCH] gnu: Add libcyaml.
@ 2020-02-12 12:55 Alexandros Theodotou
  2020-02-12 23:56 ` bug#39574: " Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandros Theodotou @ 2020-02-12 12:55 UTC (permalink / raw)
  To: 39574


[-- Attachment #1.1: Type: text/plain, Size: 182 bytes --]

Hi,

This patch adds libcyaml, a C library for parsing YAML into/from C
structs. It will be required as a dependency to the zrythm package in
its next release.

Thanks,
Alex

[-- Attachment #1.2: 0001-gnu-Add-libcyaml.patch --]
[-- Type: text/x-patch, Size: 2532 bytes --]

From 968b188c9de49a6ad4cbcecfc4a6cde1e37f3411 Mon Sep 17 00:00:00 2001
From: Alexandros Theodotou <alex@zrythm.org>
Date: Wed, 12 Feb 2020 12:51:37 +0000
Subject: [PATCH] gnu: Add libcyaml.

* gnu/packages/web.scm (libcyaml): New variable.
---
 gnu/packages/web.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 0f20cf205c..19051b5f85 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -37,6 +37,7 @@
 ;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org>
 ;;; Copyright © 2019 Florian Pelz <pelzflorian@pelzflorian.de>
 ;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
+;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1435,6 +1436,48 @@ hash/signatures.")
         (base32
          "1karpcfgacgppa82wm2drcfn2kb6q2wqfykf5nrhy20sci2i2a3q"))))))
 
+(define-public libcyaml
+  (package
+    (name "libcyaml")
+    (version "1.0.1")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/tlsa/libcyaml.git")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32
+            "0h5ydyqdl8kzh526np3jsi0pm7ks16nh1hjkdsjcd6pacw7y6i6z"))))
+    (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
+         ;; no configure script
+         (delete 'configure)
+         (replace 'check
+           (lambda _
+             (setenv "CC" "gcc")
+             (invoke "make" "test"))))))
+    (inputs
+      `(("libyaml" ,libyaml)))
+    (native-inputs
+      `(("pkg-config", pkg-config)
+        ("git", git)))
+    (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 libquvi-scripts
   (package
     (name "libquvi-scripts")
-- 
2.25.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#39574: [PATCH] gnu: Add libcyaml.
  2020-02-12 12:55 [bug#39574] [PATCH] gnu: Add libcyaml Alexandros Theodotou
@ 2020-02-12 23:56 ` Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 0 replies; 2+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2020-02-12 23:56 UTC (permalink / raw)
  To: 39574-done


[-- Attachment #1.1: Type: text/plain, Size: 168 bytes --]

Alexandros,

Pushed as eb642f3d247ee0c74122017354c57bdce028eb57, with the 
indentation tweaks below (C-M-q in emacs, and moving the comment 
in-line).

Thanks!

T G-R


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: Type: text/patch, Size: 2041 bytes --]

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 18e392f857..7f67dd764e 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -1441,15 +1441,14 @@ hash/signatures.")
     (name "libcyaml")
     (version "1.0.1")
     (source
-      (origin
-        (method git-fetch)
-        (uri (git-reference
-               (url "https://github.com/tlsa/libcyaml.git")
-               (commit (string-append "v" version))))
-        (file-name (git-file-name name version))
-        (sha256
-          (base32
-            "0h5ydyqdl8kzh526np3jsi0pm7ks16nh1hjkdsjcd6pacw7y6i6z"))))
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/tlsa/libcyaml.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0h5ydyqdl8kzh526np3jsi0pm7ks16nh1hjkdsjcd6pacw7y6i6z"))))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags
@@ -1457,20 +1456,19 @@ hash/signatures.")
              (string-append "CC=gcc"))
        #:phases
        (modify-phases %standard-phases
-         ;; no configure script
-         (delete 'configure)
+         (delete 'configure)            ; no configure script
          (replace 'check
            (lambda _
              (setenv "CC" "gcc")
              (invoke "make" "test"))))))
     (inputs
-      `(("libyaml" ,libyaml)))
+     `(("libyaml" ,libyaml)))
     (native-inputs
-      `(("pkg-config", pkg-config)
-        ("git", git)))
+     `(("git", git)
+       ("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
+     "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)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-12 23:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12 12:55 [bug#39574] [PATCH] gnu: Add libcyaml Alexandros Theodotou
2020-02-12 23:56 ` bug#39574: " Tobias Geerinckx-Rice via Guix-patches via

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).