diff options
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/local.mk | 3 | ||||
-rw-r--r-- | gnu/packages/dezyne.scm | 113 |
2 files changed, 115 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index f05f3638f9..c100b97cc1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -11,7 +11,7 @@ # Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com> # Copyright © 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com> # Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il> -# Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> +# Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> # Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> # Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org> # Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com> @@ -191,6 +191,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/debian.scm \ %D%/packages/debug.scm \ %D%/packages/dejagnu.scm \ + %D%/packages/dezyne.scm \ %D%/packages/dhall.scm \ %D%/packages/dico.scm \ %D%/packages/dictionaries.scm \ diff --git a/gnu/packages/dezyne.scm b/gnu/packages/dezyne.scm new file mode 100644 index 0000000000..494597e85c --- /dev/null +++ b/gnu/packages/dezyne.scm @@ -0,0 +1,113 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> +;;; +;;; 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 <http://www.gnu.org/licenses/>. + +(define-module (gnu packages dezyne) + #:use-module (guix build-system gnu) + #:use-module (guix download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) + #:use-module (gnu packages guile) + #:use-module (gnu packages maths) + #:use-module (gnu packages pkg-config)) + +(define-public dezyne + (package + (name "dezyne") + (version "2.15.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://dezyne.org/download/dezyne/" + name "-" version ".tar.gz")) + (sha256 + (base32 "1sh9chg5q10c3bzsmgl1pb7pmdf04j2lqszhw8jk5qlxr9y8ybcq")))) + (inputs `(("bash" ,bash-minimal) + ("guile" ,guile-3.0-latest) + ("guile-json" ,guile-json-4) + ("guile-readline" ,guile-readline) + ("mcrl2" ,mcrl2-minimal) + ("sed" ,sed))) + (native-inputs (list guile-3.0-latest pkg-config)) + (build-system gnu-build-system) + (arguments + `(#:modules ((ice-9 popen) + ,@%gnu-build-system-modules) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'disable-tests + (lambda _ + ;; The mCRL2 output for these tests is unstable, i.e., varies + ;; between different builds. + (substitute* "Makefile.in" + (("test/all/compliance_blocking_double_release ") " ") + (("test/all/illegal_external_nonsynchronous ") " ") + (("test/all/livelock_synchronous_illegal ") " ") + (("test/all/queuefull_external_sync ") " ")))) + (add-before 'configure 'setenv + (lambda _ + (setenv "GUILE_AUTO_COMPILE" "0"))) + (add-after 'install 'install-readmes + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (base (string-append ,name "-" ,version)) + (doc (string-append out "/share/doc/" base))) + (mkdir-p doc) + (copy-file "NEWS" (string-append doc "/NEWS"))))) + (add-after 'install 'wrap-binaries + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bash (assoc-ref %build-inputs "bash")) + (guile (assoc-ref %build-inputs "guile")) + (json (assoc-ref %build-inputs "guile-json")) + (mcrl2 (assoc-ref %build-inputs "mcrl2")) + (readline (assoc-ref %build-inputs "guile-readline")) + (sed (assoc-ref %build-inputs "sed")) + (effective (read + (open-pipe* OPEN_READ + "guile" "-c" + "(write (effective-version))"))) + (path (list (string-append bash "/bin") + (string-append guile "/bin") + (string-append mcrl2 "/bin") + (string-append sed "/bin"))) + (scm-dir (string-append "/share/guile/site/" effective)) + (scm-path + (list (string-append out scm-dir) + (string-append json scm-dir) + (string-append readline scm-dir))) + (go-dir (string-append "/lib/guile/" effective + "/site-ccache/")) + (go-path (list (string-append out go-dir) + (string-append json go-dir) + (string-append readline go-dir)))) + (wrap-program (string-append out "/bin/dzn") + `("PATH" ":" prefix ,path) + `("GUILE_AUTO_COMPILE" ":" = ("0")) + `("GUILE_LOAD_PATH" ":" prefix ,scm-path) + `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path)))))))) + (synopsis "Programming language with verifyable formal semantics") + (description "Dezyne is a programming language and a set of tools to +specify, validate, verify, simulate, document, and implement concurrent +control software for embedded and cyber-physical systems. The Dezyne language +has formal semantics expressed in @url{https://mcrl2.org,mCRL2}.") + (home-page "https://dezyne.org") + (license (list license:agpl3+ ;Dezyne itself + license:lgpl3+ ;Dezyne runtime library + license:cc0)))) ;Code snippets, images, test data |