From c2064aea0a3de692b02475070d6aa0306f20eccd Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Thu, 18 Mar 2021 15:51:18 -0400 Subject: [PATCH 42/50] gnu: Add xsd. * gnu/packages/codesynthesis.scm (xsd): New variable. --- gnu/packages/codesynthesis.scm | 48 ++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gnu/packages/codesynthesis.scm b/gnu/packages/codesynthesis.scm index b70e53cd7c..58f4fa9301 100644 --- a/gnu/packages/codesynthesis.scm +++ b/gnu/packages/codesynthesis.scm @@ -19,6 +19,7 @@ (define-module (gnu packages codesynthesis) #:use-module (gnu packages) + #:use-module (gnu packages onc-rpc) #:use-module (gnu packages pkg-config) #:use-module (gnu packages xml) #:use-module ((guix licenses) #:prefix license:) @@ -196,3 +197,50 @@ command line interfaces of C++ programs. It allows you to describe the options that your program supports, their types, default values, and documentation.") (home-page "https://codesynthesis.com/projects/cli/") (license license:expat))) + +(define-public xsd + (package + (name "xsd") + (version "4.0.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.codesynthesis.com/download/" + "xsd/" (version-major+minor version) + "/xsd-" version ".tar.bz2")) + (sha256 + (base32 "1hi9ppxd34np8ydv1h0vgc2qpdmgcd1cdzgk30aidv670xjg91fx")))) + (build-system gnu-build-system) + (arguments + `(#:test-target "test" + #:make-flags + (list + (string-append "install_prefix=" (assoc-ref %outputs "out"))) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda _ + (substitute* (find-files "." "\\.make$") + (("build-0\\.3") + (string-append (assoc-ref %build-inputs "build") + "/include/build-0.3"))) + #t)) + (delete 'configure)))) + (native-inputs + `(("build" ,build) + ("cli" ,cli) + ("pkg-config" ,pkg-config))) + (inputs + `(("libcutl" ,libcutl) + ("libnsl" ,libnsl) + ("libxsd-frontend" ,libxsd-frontend))) + (propagated-inputs + `(("libexpat" ,expat) + ("libxerces-c" ,xerces-c))) + (synopsis "XML Schema to C++ translator") + (description "@package{xsd} is a W3C XML Schema to C++ translator. It +generates vocabulary-specific, statically-typed C++ mappings/bindings from XML +Schema definitions. It supports two C++ mappings: in-memory C++/Tree and +event-driven C++/Parser.") + (home-page "https://codesynthesis.com/projects/xsd/") + (license license:gpl2+))) -- 2.31.0