| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 |
|
| 19 | (define-module (gnu packages dezyne)
|
| 20 | #:use-module (guix build-system gnu)
|
| 21 | #:use-module (guix download)
|
| 22 | #:use-module ((guix licenses) #:prefix license:)
|
| 23 | #:use-module (guix gexp)
|
| 24 | #:use-module (guix packages)
|
| 25 | #:use-module (gnu packages)
|
| 26 | #:use-module (gnu packages base)
|
| 27 | #:use-module (gnu packages bash)
|
| 28 | #:use-module (gnu packages boost)
|
| 29 | #:use-module (gnu packages gnupg)
|
| 30 | #:use-module (gnu packages guile)
|
| 31 | #:use-module (gnu packages maths)
|
| 32 | #:use-module (gnu packages pkg-config)
|
| 33 | #:use-module (gnu packages pth))
|
| 34 |
|
| 35 | (define-public dezyne
|
| 36 | (package
|
| 37 | (name "dezyne")
|
| 38 | (version "2.20.0")
|
| 39 | (source
|
| 40 | (origin
|
| 41 | (method url-fetch)
|
| 42 | (uri (string-append "https://dezyne.org/download/dezyne/"
|
| 43 | name "-" version ".tar.gz"))
|
| 44 | (sha256
|
| 45 | (base32 "1v5h08fjjhqvplq4dk0293ny55s8fbjk1qyiclvn0vkxngrhblnh"))))
|
| 46 | (inputs (list bash-minimal
|
| 47 | boost
|
| 48 | guile-3.0
|
| 49 | guile-gcrypt
|
| 50 | guile-json-4
|
| 51 | guile-readline
|
| 52 | (libc-utf8-locales-for-target)
|
| 53 | mcrl2-minimal
|
| 54 | pth
|
| 55 | scmackerel
|
| 56 | sed))
|
| 57 | (native-inputs (list guile-3.0 pkg-config))
|
| 58 | (build-system gnu-build-system)
|
| 59 | (arguments
|
| 60 | (list
|
| 61 | #:modules `((ice-9 popen)
|
| 62 | ,@%default-gnu-modules)
|
| 63 | #:phases
|
| 64 | #~(modify-phases %standard-phases
|
| 65 | (add-after 'unpack 'fixup-gcc14
|
| 66 | (lambda _
|
| 67 | (substitute* "test/all/blocking_shell/c++/main.cc"
|
| 68 | (("provides") "provide")
|
| 69 | (("requires") "require"))))
|
| 70 | (add-before 'configure 'setenv
|
| 71 | (lambda _
|
| 72 | (setenv "GUILE_AUTO_COMPILE" "0")))
|
| 73 | (add-after 'install 'install-readmes
|
| 74 | (lambda _
|
| 75 | (let* ((base (string-append #$name "-" #$version))
|
| 76 | (doc (string-append #$output "/share/doc/" base)))
|
| 77 | (mkdir-p doc)
|
| 78 | (copy-file "NEWS" (string-append doc "/NEWS")))))
|
| 79 | (add-after 'install 'wrap-binaries
|
| 80 | (lambda _
|
| 81 | (let* ((bash #$(this-package-input "bash-minimal"))
|
| 82 | (guile #$(this-package-input "guile"))
|
| 83 | (json #$(this-package-input "guile-json"))
|
| 84 | (mcrl2 #$(this-package-input "mcrl2-minimal"))
|
| 85 | (readline #$(this-package-input "guile-readline"))
|
| 86 | (scmackerel #$(this-package-input "scmackerel"))
|
| 87 | (sed #$(this-package-input "sed"))
|
| 88 | (effective (read
|
| 89 | (open-pipe* OPEN_READ
|
| 90 | "guile" "-c"
|
| 91 | "(write (effective-version))")))
|
| 92 | (path (list (string-append bash "/bin")
|
| 93 | (string-append guile "/bin")
|
| 94 | (string-append mcrl2 "/bin")
|
| 95 | (string-append sed "/bin")))
|
| 96 | (scm-dir (string-append "/share/guile/site/" effective))
|
| 97 | (scm-path
|
| 98 | (list (string-append #$output scm-dir)
|
| 99 | (string-append json scm-dir)
|
| 100 | (string-append readline scm-dir)
|
| 101 | (string-append scmackerel scm-dir)))
|
| 102 | (go-dir (string-append "/lib/guile/" effective
|
| 103 | "/site-ccache/"))
|
| 104 | (go-path (list (string-append #$output go-dir)
|
| 105 | (string-append json go-dir)
|
| 106 | (string-append readline go-dir)
|
| 107 | (string-append scmackerel go-dir))))
|
| 108 | (wrap-program (string-append #$output "/bin/dzn")
|
| 109 | `("PATH" ":" prefix ,path)
|
| 110 | `("GUILE_AUTO_COMPILE" ":" = ("0"))
|
| 111 | `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
|
| 112 | `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path))))))))
|
| 113 | (synopsis "Programming language with verifyable formal semantics")
|
| 114 | (description "Dezyne is a programming language and a set of tools to
|
| 115 | specify, validate, verify, simulate, document, and implement concurrent
|
| 116 | control software for embedded and cyber-physical systems. The Dezyne language
|
| 117 | has formal semantics expressed in @url{https://mcrl2.org,mCRL2}.")
|
| 118 | (home-page "https://dezyne.org")
|
| 119 | (license (list license:agpl3+ |
| 120 | license:lgpl3+ |
| 121 | license:cc0)))) |
| 122 |
|
| 123 | (define-public scmackerel
|
| 124 | (package
|
| 125 | (name "scmackerel")
|
| 126 | (version "0.5.3")
|
| 127 | (source
|
| 128 | (origin
|
| 129 | (method url-fetch)
|
| 130 | (uri (string-append "https://dezyne.org/download/scmackerel/"
|
| 131 | name "-" version ".tar.gz"))
|
| 132 | (sha256
|
| 133 | (base32 "1sgrkw3idsni1ylf0slwgzzwq31b1yx6s0j17yq99c88agk9cvd6"))))
|
| 134 | (inputs (list bash-minimal
|
| 135 | guile-3.0
|
| 136 | guile-readline
|
| 137 | mcrl2-minimal))
|
| 138 | (native-inputs (list guile-3.0 pkg-config))
|
| 139 | (build-system gnu-build-system)
|
| 140 | (arguments
|
| 141 | (list
|
| 142 | #:modules `((ice-9 popen)
|
| 143 | ,@%default-gnu-imported-modules)
|
| 144 | #:phases
|
| 145 | #~(modify-phases %standard-phases
|
| 146 | (add-before 'configure 'setenv
|
| 147 | (lambda _
|
| 148 | (setenv "GUILE_AUTO_COMPILE" "0")))
|
| 149 | (add-after 'install 'install-readmes
|
| 150 | (lambda _
|
| 151 | (let* ((base (string-append #$name "-" #$version))
|
| 152 | (doc (string-append #$output "/share/doc/" base)))
|
| 153 | (mkdir-p doc)
|
| 154 | (copy-file "NEWS" (string-append doc "/NEWS"))))))))
|
| 155 | (synopsis "AST library in GNU Guile")
|
| 156 | (description "SCMackerel is a library in GNU Guile to create abstract
|
| 157 | syntax trees (ASTs). Initially written for @url{https://mcrl2.org,mCRL2} and
|
| 158 | now also supporting other languages, such as C, C++, and C#. Based on GNU
|
| 159 | Guix records.")
|
| 160 | (home-page "https://gitlab.com/janneke/scmackerel")
|
| 161 | (license (list license:gpl3+))))
|