From 559feb66618bbeca96ea5431522196d10951b378 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 17 Jan 2021 15:52:08 +0100 Subject: gnu: Add guile-libyaml. * gnu/packages/guile-xyz.scm (guile-libyaml): New variable. --- gnu/packages/guile-xyz.scm | 70 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) (limited to 'gnu') diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 9775cc33f0..c2d853f006 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -82,6 +82,7 @@ #:use-module (gnu packages linux) #:use-module (gnu packages man) #:use-module (gnu packages maths) + #:use-module (gnu packages mes) #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) #:use-module (gnu packages networking) @@ -101,6 +102,7 @@ #:use-module (gnu packages texinfo) #:use-module (gnu packages tls) #:use-module (gnu packages version-control) + #:use-module (gnu packages web) #:use-module (gnu packages webkit) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg) @@ -4430,6 +4432,74 @@ including parsing and code generation.") "Guile Shapefile is a Guile library for reading shapefiles.") (license license:expat))) +(define-public guile-libyaml + (let ((commit "f5d33a6880e96571d3cb079ed7755ffc156cac46") + (revision "1")) + (package + (name "guile-libyaml") + (version (git-version "0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mwette/guile-libyaml") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "12x91983fh1j39zy7kbk19acc1rqdh8515ddx1mh7l26j04k9wgq")))) + (build-system gnu-build-system) + (arguments + `(#:modules (((guix build guile-build-system) + #:prefix guile:) + ,@%gnu-build-system-modules) + #:imported-modules ((guix build guile-build-system) + ,@%gnu-build-system-modules) + #:tests? #false ; there are none + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'remove-unused-files + (lambda* (#:key inputs #:allow-other-keys) + (for-each delete-file + '("guix.scm" "demo1.yml" "demo1.scm" + "yaml/libyaml.scm" + ;; This file is mismatched with the generated FFI code. + "yaml/ffi-help-rt.scm")) + (copy-file (string-append (assoc-ref inputs "nyacc") + "/share/guile/site/3.0/system/ffi-help-rt.scm") + "yaml/ffi-help-rt.scm") + (substitute* "yaml/ffi-help-rt.scm" + (("system ffi-help-rt") "yaml ffi-help-rt")) + #true)) + (add-before 'build 'build-ffi + (lambda* (#:key inputs #:allow-other-keys) + (invoke "guild" "compile-ffi" + "--no-exec" ; allow us to patch the generated file + "yaml/libyaml.ffi") + (substitute* "yaml/libyaml.scm" + (("system ffi-help-rt") "yaml ffi-help-rt") + (("dynamic-link \"libyaml\"") + (format #false "dynamic-link \"~a/lib/libyaml\"" + (assoc-ref inputs "libyaml")))) + #true)) + (replace 'build + (assoc-ref guile:%standard-phases 'build)) + (delete 'install)))) + (inputs + `(("guile" ,guile-3.0) + ("libyaml" ,libyaml))) + (propagated-inputs + `(("guile-bytestructures" ,guile-bytestructures))) + (native-inputs + `(("nyacc" ,nyacc))) + (home-page "https://github.com/mwette/guile-libyaml") + (synopsis "Guile wrapper for libyaml") + (description + "This package provides a simple yaml module for Guile using the +ffi-helper from nyacc.") + (license license:lgpl3+)))) + (define-public schmutz (let ((commit "add24588c59552537b8f1316df99a0cdd62c221e") (revision "1")) -- cgit v1.2.3