From fd313c8f54f2a82671b7c8c74339f568aa595e0a Mon Sep 17 00:00:00 2001 From: "Collin J. Doering" Date: Wed, 13 Oct 2021 12:11:44 -0400 Subject: [PATCH] emacs-xyz: Add emacs-yaml package --- rekahsoft-gnu/packages/emacs-xyz.scm | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/rekahsoft-gnu/packages/emacs-xyz.scm b/rekahsoft-gnu/packages/emacs-xyz.scm index 43e91a4..c5bba89 100644 --- a/rekahsoft-gnu/packages/emacs-xyz.scm +++ b/rekahsoft-gnu/packages/emacs-xyz.scm @@ -867,3 +867,37 @@ dashboard!") (description "Displays icons for all buffers in ibuffer") (license license:gpl3+))) + +;; TODO: Upstream candidate +(define-public emacs-yaml + (package + (name "emacs-yaml") + (version "0.3.4") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/zkry/yaml.el.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "13fjxrr7iyfagbm21p5is5jw1zv56ns2mnac145v8lqli6mrr5gx")))) + (build-system emacs-build-system) + (home-page "https://github.com/zkry/yaml.el") + (synopsis "YAML parser for Elisp") + (description + "yaml.el contains the code for parsing YAML natively in Elisp with +no dependencies. The main function to parse YAML provided is +`yaml-parse-string'. `yaml-encode' is also provided to encode a +Lisp object to YAML. The following are some examples of its usage: + +(yaml-parse-string \"key1: value1\ +key2: value2\") +(yaml-parse-string \"key1: value1\ +key2: value2\" :object-type 'alist) +(yaml-parse-string \"numbers: [1, 2, 3]\" :sequence-type 'list) + +(yaml-encode '((count . 3) (value . 10) (items (\"ruby\" \"diamond\")))) +") + (license license:gpl3))) +