From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: 64135@debbugs.gnu.org
Subject: [bug#64135] [PATCH 2/2] gnu: Add miking.
Date: Sat, 17 Jun 2023 19:08:08 +0200 [thread overview]
Message-ID: <c225fb49f3b105f2426e5d312caf334788889051.1687022754.git.liliana.prikler@gmail.com> (raw)
In-Reply-To: <cover.1687022754.git.liliana.prikler@gmail.com>
* gnu/packages/miking.scm (miking): New variable.
---
gnu/packages/miking.scm | 52 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/gnu/packages/miking.scm b/gnu/packages/miking.scm
index 7d65e98970..83a431d443 100644
--- a/gnu/packages/miking.scm
+++ b/gnu/packages/miking.scm
@@ -73,3 +73,55 @@ (define-public miking-boot
(description "@acronym{Miking, Meta Viking} is a meta language system
for creating embedded domain-specific and general-purpose languages.")
(license license:expat))))
+
+(define-public miking
+ (package/inherit
+ miking-boot
+ (name "miking")
+ (build-system copy-build-system)
+ (arguments
+ (list #:install-plan #~`(("build/mi" "bin/")
+ ("stdlib" "lib/mcore"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install 'build
+ (lambda _
+ (invoke "boot" "eval" "src/main/mi-lite.mc"
+ "--"
+ "0" "src/main/mi-lite.mc" "mi-lite")
+ (invoke "./mi-lite" "1" "src/main/mi.mc" "./mi")
+ (invoke "./mi" "compile" "src/main/mi.mc")
+ (mkdir "build")
+ (rename-file "mi" "build/mi")))
+ (add-after 'build 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (for-each (compose
+ (lambda (file check)
+ (invoke "make" "-f" file check))
+ (lambda (pair) (values (car pair) (cdr pair))))
+ '(("test-compile.mk" . "selected")
+ ("test-run.mk" . "selected")
+ ("test-tune.mk" . "all"))))))
+ (add-after 'install 'wrap
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (wrap-program (string-append (assoc-ref outputs "out")
+ "/bin/mi")
+ `("PATH" suffix
+ (,(dirname (search-input-file inputs "bin/dune"))
+ ,(dirname (search-input-file inputs "bin/ocaml"))
+ ,(dirname (search-input-file inputs "bin/which"))))
+ `("OCAMLPATH" suffix (,(getenv "OCAMLPATH")))))))))
+ (inputs (list bash-minimal
+ dune
+ miking-boot
+ ocaml
+ ocaml-linenoise
+ which))
+ (native-inputs (list dune
+ gnu-make
+ miking-boot
+ ocaml
+ ;; needed for tests
+ coreutils
+ which))))
--
2.40.1
prev parent reply other threads:[~2023-06-17 18:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-17 17:25 [bug#64135] [PATCH 0/2] Add miking Liliana Marie Prikler
2023-06-17 17:06 ` [bug#64135] [PATCH 1/2] gnu: Add miking-boot Liliana Marie Prikler
2023-06-17 17:08 ` Liliana Marie Prikler [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c225fb49f3b105f2426e5d312caf334788889051.1687022754.git.liliana.prikler@gmail.com \
--to=liliana.prikler@gmail.com \
--cc=64135@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).