;;; GNU Guix --- Functional package management for GNU ;;; ;;; Copyright © 2020 Raghav Gururajan ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages codesynthesis) #:use-module (gnu packages) #:use-module (gnu packages pkg-config) #:use-module (gnu packages xml) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) #:use-module (guix build utils) #:use-module (guix build-system gnu)) (define-public build (package (name "build") (version "0.3.10") (source (origin (method url-fetch) (uri (string-append "https://www.codesynthesis.com/download/" "build/" (version-major+minor version) "/build-" version ".tar.bz2")) (sha256 (base32 "1lx5rpnmsbip43zpp0a57sl5rm7pjb0y6i2si6rfglfp4p9d3z76")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; No target #:make-flags (list (string-append "install_prefix=" (assoc-ref %outputs "out"))) #:phases (modify-phases %standard-phases (delete 'configure) (delete 'build)))) (synopsis "Software Build System") (description "@package{build} is a massively-parallel software build system implemented on top of GNU make.") (home-page "https://www.codesynthesis.com/projects/libxsd-frontend/") (license license:gpl2+))) (define-public libcutl (package (name "libcutl") (version "1.10.0") (source (origin (method url-fetch) (uri (string-append "https://www.codesynthesis.com/download/libcutl/" (version-major+minor version) "/libcutl-" version ".tar.bz2")) (sha256 (base32 "070j2x02m4gm1fn7gnymrkbdxflgzxwl7m96aryv8wp3f3366l8j")) (modules '((guix build utils))) (snippet `(begin ;; Remove bundled sources. (with-directory-excursion "cutl/details" (for-each delete-file-recursively ;; FIXME: Boost_RegEx isn't being detected. (list ;; "boost" "expat"))) #t)))) (build-system gnu-build-system) (arguments `(#:configure-flags (list "--disable-static" ;; "--with-external-boost" "--with-external-expat"))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(;; ("boost" ,boost) ("expat" ,expat))) (synopsis "C++ utility library") (description "@package{libcutl} is a C++ utility library. It contains a collection of generic and independent components such as meta-programming tests, smart pointers, containers, compiler building blocks, etc.") (home-page "https://www.codesynthesis.com/projects/libcutl/") (license license:expat))) (define-public libxsd-frontend (package (name "libxsd-frontend") (version "2.0.0") (source (origin (method url-fetch) (uri (string-append "https://www.codesynthesis.com/download/" "libxsd-frontend/" (version-major+minor version) "/libxsd-frontend-" version ".tar.bz2")) (sha256 (base32 "1nmzchsvwvn66jpmcx18anzyl1a3l309x1ld4zllrg37ijc31fim")))) (build-system gnu-build-system) (arguments `(#:test-target "test" #:imported-modules ((guix build copy-build-system) ,@%gnu-build-system-modules) #:modules (((guix build copy-build-system) #:prefix copy:) (guix build gnu-build-system) (guix build utils)) #: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) (replace 'install (lambda args (apply (assoc-ref copy:%standard-phases 'install) #:install-plan '(("xsd-frontend" "include/xsd-frontend" #:include-regexp ("\\.?xx$")) ("xsd-frontend" "lib" #:include-regexp ("\\.so$"))) args)))))) (native-inputs `(("build" ,build) ("pkg-config" ,pkg-config))) (inputs `(("libcutl" ,libcutl) ("libxerces-c" ,xerces-c))) (synopsis "XSD Front-end") (description "@package{libxsd-frontend} is a compiler frontend for the W3C XML Schema definition language. It includes a parser, semantic graph types and a traversal mechanism.") (home-page "https://www.codesynthesis.com/projects/libxsd-frontend/") (license license:gpl2+))) (define-public cli (package (name "cli") (version "1.1.0") (source (origin (method url-fetch) (uri (string-append "https://www.codesynthesis.com/download/" "cli/" (version-major+minor version) "/cli-" version ".tar.bz2")) (sha256 (base32 "0bg0nsai2q4h3mldpnj0jz4iy4svs0bcfvmq0v0c9cdyknny606g")))) (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"))) (substitute* (find-files "." "\\.?xx$") (("add \\(typeid \\(type\\), \\*this\\);") "traverser_map::add (typeid (type), *this);") (("iterate_and_dispatch \\(s\\.names_begin \\(\\), s\\.names_end \\(\\), d\\);") "edge_dispatcher::iterate_and_dispatch (s.names_begin (), s.names_end (), d);")) #t)) (delete 'configure)))) (native-inputs `(("build" ,build) ("pkg-config" ,pkg-config))) (inputs `(("libcutl" ,libcutl))) (synopsis "Command Line Interface (CLI) definition language") (description "@package{cli} is a domain-specific language (DSL) for defining 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)))