summaryrefslogtreecommitdiff
path: root/gnu/packages/cpp.scm
diff options
context:
space:
mode:
authorRaghav Gururajan <rg@raghavgururajan.name>2021-03-27 22:46:39 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-03-27 23:55:34 -0400
commit510e24f973a918391d8122fd6ad515c0567bf23e (patch)
treee111e9882fd82f36c0f49a3513eba30a8d47a11f /gnu/packages/cpp.scm
parentf649a0a557bdc4afc39e033597f5b67cdabd3743 (diff)
downloadguix-patches-510e24f973a918391d8122fd6ad515c0567bf23e.tar
guix-patches-510e24f973a918391d8122fd6ad515c0567bf23e.tar.gz
gnu: Add xsd.
* gnu/packages/cpp.scm (xsd): New variable. Co-authored-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu/packages/cpp.scm')
-rw-r--r--gnu/packages/cpp.scm58
1 files changed, 58 insertions, 0 deletions
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 22d1341b8d..2a00d3838a 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -63,6 +63,7 @@
#:use-module (gnu packages llvm)
#:use-module (gnu packages logging)
#:use-module (gnu packages maths)
+ #:use-module (gnu packages onc-rpc)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages popt)
@@ -1153,3 +1154,60 @@ 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)
+ (outputs '("out" "doc")) ;3.8 MiB of doc and examples
+ (arguments
+ `(#:test-target "test"
+ #:make-flags (list (string-append "--include-dir="
+ (assoc-ref %build-inputs "build")
+ "/include/")
+ (string-append "install_prefix="
+ (assoc-ref %outputs "out")))
+ #:phases (modify-phases %standard-phases
+ (add-after 'install 'move-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (mkdir-p (string-append doc "/share/doc"))
+ (rename-file (string-append out "/share/doc/xsd")
+ (string-append doc "/share/doc/xsd-"
+ ,version)))))
+ (delete 'configure))))
+ (native-inputs
+ `(("build" ,build)
+ ("cli" ,cli)))
+ (inputs
+ `(("libcutl" ,libcutl)
+ ("libnsl" ,libnsl)
+ ("libxsd-frontend" ,libxsd-frontend)))
+ (propagated-inputs
+ ;; The code XSD generates requires the following library at run time;
+ ;; propagate it for convenience.
+ `(("xerces-c" ,xerces-c)))
+ (synopsis "XML Data Binding for C++")
+ (description "CodeSynthesis XSD (also known as libxsd or xsdcxx) is an XML
+Schema to C++ data binding compiler. Provided with an XML instance
+specification (XML Schema), it generates C++ classes that represent the given
+vocabulary as well as XML parsing and serialization code. The data stored in
+XML can then be accessed using types and functions that semantically
+correspond to an application domain rather than dealing with the intricacies
+of reading and writing XML.")
+ (home-page "https://codesynthesis.com/projects/xsd/")
+ ;; Exceptions are made to allow using the generated source files as well
+ ;; as the libxsd library in free software projects whose license is
+ ;; incompatible with the GPL v2. Refer to the file named FLOSSE for the
+ ;; details.
+ (license license:gpl2+)))