From patchwork Sat Jun 17 17:06:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 51021 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BD08D27BBEA; Sat, 17 Jun 2023 19:35:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, PP_MIME_FAKE_ASCII_TEXT,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D873D27BBE2 for ; Sat, 17 Jun 2023 19:35:27 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAalO-00037P-Ut; Sat, 17 Jun 2023 14:35:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAalL-00036m-Ey for guix-patches@gnu.org; Sat, 17 Jun 2023 14:35:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qAalL-0008Cx-6h for guix-patches@gnu.org; Sat, 17 Jun 2023 14:35:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qAalL-0004tl-2g for guix-patches@gnu.org; Sat, 17 Jun 2023 14:35:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64135] [PATCH 1/2] gnu: Add miking-boot. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Jun 2023 18:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64135 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64135@debbugs.gnu.org Received: via spool by 64135-submit@debbugs.gnu.org id=B64135.168702685218760 (code B ref 64135); Sat, 17 Jun 2023 18:35:03 +0000 Received: (at 64135) by debbugs.gnu.org; 17 Jun 2023 18:34:12 +0000 Received: from localhost ([127.0.0.1]:52608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAakV-0004sQ-Hx for submit@debbugs.gnu.org; Sat, 17 Jun 2023 14:34:12 -0400 Received: from mail-ej1-f66.google.com ([209.85.218.66]:42319) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAakS-0004rz-1i for 64135@debbugs.gnu.org; Sat, 17 Jun 2023 14:34:10 -0400 Received: by mail-ej1-f66.google.com with SMTP id a640c23a62f3a-986864cfe5dso292447766b.1 for <64135@debbugs.gnu.org>; Sat, 17 Jun 2023 11:34:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687026842; x=1689618842; h=mime-version:to:subject:date:from:references:in-reply-to:message-id :from:to:cc:subject:date:message-id:reply-to; bh=h04imurRVV3v2H+G9j0lB9UKrP/xpwrrNgaiWoKSLRU=; b=ZGAoEQZiqxWSnRb1GQi7TvaCQL3e170ONTo4vhQ41ShB+nJPwGWzgR6m0eYW6ynzWj 5KLfUKDDSdEwTEB7FxGeNDo1uC4Jwe43sQoEq95qNkLHevNyzoniwQQs1/ZqJFKl+OcA YrljADhIq8l++u1gd398UxVNc600gPKPEYdhme/UqEu0vqqFhzo+LQSvIcoThpCdjmCk Ro3Y9uMOnE3pq3RmGqYkIg2nXnr5FeTcukVYhxgKv3374qdKcN/0uIh69KveGU0cynOO zV4CKuYevYgW4CxliHJZhgfwq70rJmWJrrDOqbFePElycH9uRQpF5eo6ru4G5uILgv1V Ocfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687026842; x=1689618842; h=mime-version:to:subject:date:from:references:in-reply-to:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=h04imurRVV3v2H+G9j0lB9UKrP/xpwrrNgaiWoKSLRU=; b=Jm+jcr7eZYqJ2HsFLWD1la9f5JQO2Qt4YFezh/Q3dkKv956bdVehfD8ogHL2kDfKVL 5dMC/7PVSJ/SJXMAzMLDqmBJjvt7acU+22lybq9q6Duv5t7jFkPfU7EG7eUO9HhQ3qcW vVLxdGX7cXnOkwIErbDOezGY/XZtnZXQDmv4E/lfDVoWieZn8PdseyfFPFgJxZrU3A0z 9+nUL/saWBEy4eaWt100I+9720r6eCinpEKXpVYxTlOR0/+5awxmpCp5jwtqGq/+OqkK 3ywzyDH5TsKsfjgy1uDxHh24MH7spvVeh1JLH+vsAiSs3SdkDVXNU188DZekji3wkDSY mZrA== X-Gm-Message-State: AC+VfDx/cwDpbUz+Glof3ITq7E+zfeVbulh6x7FuKRNWxsycMfSs1DnK M2tAE4Gsa3SRjKrb7N9FDqQ6EQS5LSzx6Fqq X-Google-Smtp-Source: ACHHUZ5GaOR2wLE7CwzyGGIbBGHc6CvEOFqbAKGO41GyKM4VmPvQ5DiJo4S9xL1XiDpHUsHFL9Kacg== X-Received: by 2002:a17:907:3f18:b0:986:38ab:ef99 with SMTP id hq24-20020a1709073f1800b0098638abef99mr5655280ejc.9.1687026841873; Sat, 17 Jun 2023 11:34:01 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id i8-20020a170906a28800b009655eb8be26sm12329365ejz.73.2023.06.17.11.34.01 for <64135@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jun 2023 11:34:01 -0700 (PDT) Message-Id: <2e4aa0048428b0d2b08c46b03d8f21b54623e580.1687022754.git.liliana.prikler@gmail.com> In-Reply-To: References: From: Liliana Marie Prikler Date: Sat, 17 Jun 2023 19:06:54 +0200 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/miking.scm: New file. (miking-boot): New variable. * gnu/packages/patches/miking-drop-acceleration.patch: New file. * gnu/packages/patches/miking-preserve-OCAMLPATH: New file. * gnu/local.mk (dist_patch_DATA): Register them here. --- gnu/local.mk | 2 + gnu/packages/miking.scm | 75 +++++++++++++ .../patches/miking-drop-acceleration.patch | 106 ++++++++++++++++++ .../patches/miking-preserve-OCAMLPATH.patch | 28 +++++ 4 files changed, 211 insertions(+) create mode 100644 gnu/packages/miking.scm create mode 100644 gnu/packages/patches/miking-drop-acceleration.patch create mode 100644 gnu/packages/patches/miking-preserve-OCAMLPATH.patch diff --git a/gnu/local.mk b/gnu/local.mk index 2b3df5d75a..74676499b8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1565,6 +1565,8 @@ dist_patch_DATA = \ %D%/packages/patches/maxima-defsystem-mkdir.patch \ %D%/packages/patches/maven-generate-component-xml.patch \ %D%/packages/patches/maven-generate-javax-inject-named.patch \ + %D%/packages/patches/miking-drop-acceleration.patch \ + %D%/packages/patches/miking-preserve-OCAMLPATH.patch \ %D%/packages/patches/mcrl2-fix-1687.patch \ %D%/packages/patches/mcrl2-fix-counterexample.patch \ %D%/packages/patches/mcrypt-CVE-2012-4409.patch \ diff --git a/gnu/packages/miking.scm b/gnu/packages/miking.scm new file mode 100644 index 0000000000..7d65e98970 --- /dev/null +++ b/gnu/packages/miking.scm @@ -0,0 +1,75 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2023 Liliana Marie Prikler +;;; +;;; 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 miking) + #:use-module (guix packages) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module (guix build-system copy) + #:use-module (guix build-system dune) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) + #:use-module (gnu packages ocaml)) + +(define-public miking-boot + (let ((commit "539bd577c85d521559f630f2dbe78d2a1c80a26d") + (revision "1")) + (package + (name "miking-boot") + (version (git-version "0.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference (url "https://github.com/miking-lang/miking") + (commit commit))) + (file-name (git-file-name "miking" version)) + (patches (search-patches + "miking-drop-acceleration.patch" + "miking-preserve-OCAMLPATH.patch")) + (modules '((guix build utils))) + (snippet + #~(begin + (for-each delete-file-recursively + '("src/main/accelerate.mc" + "stdlib/cuda" + "stdlib/futhark" + "stdlib/pmexpr/build.mc" + "stdlib/pmexpr/classify.mc" + "stdlib/pmexpr/compile.mc" + "stdlib/pmexpr/wrapper.mc" + "test/examples/accelerate")) + (substitute* "test-files.mk" + (("special_dependencies_files \\+=.*" all) + (string-append all + ;; requires Domain module, which is unbound + "\t$(wildcard stdlib/multicore/*.mc) \\\n" + ;; require external ocaml packages + "\tstdlib/ext/async-ext.mc \\\n" + "\tstdlib/ext/dist-ext.mc \\\n" + "\tstdlib/ext/toml-ext.mc \\\n"))))) + (sha256 + (base32 + "1qg5w2pdsjfy03qcw8bj4nv9imyb361nws9vmr91xfbjv33m18sm")))) + (build-system dune-build-system) + (inputs (list ocaml-linenoise)) + (home-page "https://github.com/miking-lang/miking") + (synopsis "Meta language system") + (description "@acronym{Miking, Meta Viking} is a meta language system +for creating embedded domain-specific and general-purpose languages.") + (license license:expat)))) diff --git a/gnu/packages/patches/miking-drop-acceleration.patch b/gnu/packages/patches/miking-drop-acceleration.patch new file mode 100644 index 0000000000..74efb4fd4d --- /dev/null +++ b/gnu/packages/patches/miking-drop-acceleration.patch @@ -0,0 +1,106 @@ +From c04bae74e04a19c3bcbfa2e767a882227f7d0a98 Mon Sep 17 00:00:00 2001 +From: Liliana Marie Prikler +Date: Fri, 16 Jun 2023 14:10:54 +0200 +Subject: [PATCH] main: Drop acceleration support. + +This still leaves all the acceleration-specific code in stdlib, but breaks +the dependencies, allowing users to simply delete the files. +--- + src/main/compile.mc | 13 ++----------- + src/main/mi.mc | 1 - + src/main/options-config.mc | 6 ------ + src/main/options-type.mc | 1 - + src/main/options.mc | 1 - + 5 files changed, 2 insertions(+), 20 deletions(-) + +diff --git a/src/main/compile.mc b/src/main/compile.mc +index bf8a4d6..63f8e49 100644 +--- a/src/main/compile.mc ++++ b/src/main/compile.mc +@@ -1,7 +1,6 @@ + -- Miking is licensed under the MIT license. + -- Copyright (C) David Broman. See file LICENSE.txt + +-include "accelerate.mc" + include "mi-lite.mc" + include "options.mc" + include "parse.mc" +@@ -130,14 +129,7 @@ let compile = lam files. lam options : Options. lam args. + -- backends. + -- TODO(larshum, 2022-06-29): Rewrite compilation so that we don't + -- duplicate symbolization and type-checking when compiling in debug mode. +- let ast = +- if options.debugAccelerate then +- let ast = symbolizeExpr keywordsSymEnv ast in +- let ast = typeCheck ast in +- let ast = removeTypeAscription ast in +- match checkWellFormedness options ast with (ast, _, _) in +- demoteParallel ast +- else demoteParallel ast in ++ let ast = demoteParallel ast in + endPhaseStats log "accelerate" ast; + + -- Insert tuned values, or use default values if no .tune file present +@@ -149,5 +141,4 @@ let compile = lam files. lam options : Options. lam args. + + compileWithUtests options file ast; () + in +- if options.accelerate then compileAccelerate files options args +- else iter compileFile files ++ iter compileFile files +diff --git a/src/main/mi.mc b/src/main/mi.mc +index df52d1f..fb78f69 100644 +--- a/src/main/mi.mc ++++ b/src/main/mi.mc +@@ -3,7 +3,6 @@ + -- + -- File miking.mi is the main file of the Miking tool chain. + +-include "accelerate.mc" + include "compile.mc" + include "seq.mc" + include "string.mc" +diff --git a/src/main/options-config.mc b/src/main/options-config.mc +index 2284e59..33dd22b 100644 +--- a/src/main/options-config.mc ++++ b/src/main/options-config.mc +@@ -77,12 +77,6 @@ let optionsConfig : ParseConfig Options = [ + lam p: ArgPart Options. + let o: Options = p.options in + {o with accelerateTensorMaxRank = string2int (argToString p)}), +- ([("--debug-accelerate", "", "")], +- join ["Enables static and dynamic checks for accelerated expressions, ", +- "and runs the program on the CPU."], +- lam p: ArgPart Options. +- let o: Options = p.options in {o with debugAccelerate = true, +- runtimeChecks = true}), + ([("--cpu-only", "", "")], + "Translate accelerated code to multicore CPU code", + lam p: ArgPart Options. +diff --git a/src/main/options-type.mc b/src/main/options-type.mc +index 52e6fcb..d27a919 100644 +--- a/src/main/options-type.mc ++++ b/src/main/options-type.mc +@@ -20,7 +20,6 @@ type Options = { + compileAfterTune : Bool, + accelerate : Bool, + accelerateTensorMaxRank : Int, +- debugAccelerate : Bool, + cpuOnly : Bool, + use32BitIntegers : Bool, + use32BitFloats : Bool, +diff --git a/src/main/options.mc b/src/main/options.mc +index b870e47..246c03d 100644 +--- a/src/main/options.mc ++++ b/src/main/options.mc +@@ -23,7 +23,6 @@ let optionsDefault : Options = { + compileAfterTune = false, + accelerate = false, + accelerateTensorMaxRank = 3, +- debugAccelerate = false, + cpuOnly = false, + use32BitIntegers = false, + use32BitFloats = false, +-- +2.40.1 + diff --git a/gnu/packages/patches/miking-preserve-OCAMLPATH.patch b/gnu/packages/patches/miking-preserve-OCAMLPATH.patch new file mode 100644 index 0000000000..4baa966ad4 --- /dev/null +++ b/gnu/packages/patches/miking-preserve-OCAMLPATH.patch @@ -0,0 +1,28 @@ +From bef5aa66be782f0b030cf1fec40612acd03ecd92 Mon Sep 17 00:00:00 2001 +From: Liliana Marie Prikler +Date: Fri, 16 Jun 2023 08:03:52 +0200 +Subject: [PATCH] Preserve existing OCAMLPATH. + +This fixes an issue that causes builds to fail when linenoise (and potentially +other OCaml libraries) are only found via OCAMLPATH. +--- + make.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/make.sh b/make.sh +index 402b5ec..d967342 100755 +--- a/make.sh ++++ b/make.sh +@@ -25,7 +25,8 @@ LIB_PATH=$HOME/.local/lib/mcore + export MCORE_LIBS=stdlib=`pwd`/stdlib:test=`pwd`/test + + # Setup dune/ocamlfind to use local boot library when available +-export OCAMLPATH=`pwd`/build/lib ++# Do preserve existing OCAML_PATH to find linenoise et al. ++export OCAMLPATH="$(pwd)/build/lib${OCAMLPATH:+:}$OCAMLPATH" + + # Compile and build the boot interpreter + build_boot(){ +-- +2.40.1 + From patchwork Sat Jun 17 17:08:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 51020 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7F8D027BBEA; Sat, 17 Jun 2023 19:35:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 83FFA27BBE2 for ; Sat, 17 Jun 2023 19:35:10 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAalM-00036w-Mt; Sat, 17 Jun 2023 14:35:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAalL-00036e-1u for guix-patches@gnu.org; Sat, 17 Jun 2023 14:35:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qAalK-000893-PR for guix-patches@gnu.org; Sat, 17 Jun 2023 14:35:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qAalK-0004te-KM for guix-patches@gnu.org; Sat, 17 Jun 2023 14:35:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64135] [PATCH 2/2] gnu: Add miking. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Jun 2023 18:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64135 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64135@debbugs.gnu.org Received: via spool by 64135-submit@debbugs.gnu.org id=B64135.168702685118753 (code B ref 64135); Sat, 17 Jun 2023 18:35:02 +0000 Received: (at 64135) by debbugs.gnu.org; 17 Jun 2023 18:34:11 +0000 Received: from localhost ([127.0.0.1]:52606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAakV-0004sN-5R for submit@debbugs.gnu.org; Sat, 17 Jun 2023 14:34:11 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:50640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAakS-0004s1-7y for 64135@debbugs.gnu.org; Sat, 17 Jun 2023 14:34:09 -0400 Received: by mail-ed1-f65.google.com with SMTP id 4fb4d7f45d1cf-519b771f23aso2767024a12.1 for <64135@debbugs.gnu.org>; Sat, 17 Jun 2023 11:34:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687026842; x=1689618842; h=mime-version:to:subject:date:from:references:in-reply-to:message-id :from:to:cc:subject:date:message-id:reply-to; bh=5CBC94TRpySrFVWaQRnyMMCVc6awLjYx79mWPOY2Yqc=; b=L+qNIf8Z9KN7Nz0WZ7OywTDZXH7Rb5N5uVGBuJKFzBHM+OWs+90rFwqEkq8rncrPXT +E75/PnuQg5tXiL4MgQxzYtBQsS5YPb6TR4A6oVBf4PqbrCWrNs5nxB/CeUJZD9jqRUZ oLuiz6ko94rYSDyu0pbm1fPeNvoJ2KmQTpwdSlufYl4mo4+UCL0MJOm6MRYElb9xLH+Z aUUmEO4/bgpcAhi6g+/Oqsank/YEGd3aOZnIyE6RL1o/TypX416wz692rVvZwbhuEGPJ 2/W1Ahb+qftX2eVr9qgAwelyAxhgJaUm+kBbd5iee/cTthkh3SE+eOAzrUBaG9QFy4Co k4IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687026842; x=1689618842; h=mime-version:to:subject:date:from:references:in-reply-to:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5CBC94TRpySrFVWaQRnyMMCVc6awLjYx79mWPOY2Yqc=; b=IMgoo7W1tKJTtkpsm17z4OHs9y7yvlyq/HCInYHhKZEZ1omrSaaEO/psXW5wnsVCg9 WfV9Nkbnqq47xGYkU3m138MeTzuDB7l5u1tUyAN6Uh0bWzjgftt7GrUFOrMLngwAZ1gt 8qYwiet2LU//1l6+2JYvaUZStHqBxorIdQ3vNvcZPSMQK2VK6BVh4SViabx/KrMfOyjq ZuefwuWwUQTEH7aHIA1GMZTKZXpWTkZj027Vuoea4mE+4MZKyZvl6lPAUwhl3FxyGn9j nROpVcOdwHgd6247xDuj9JMWnhI5kH8CuaZ/kLGQ5Lhb6Zdl4Lj1b0vnKm6NR1Hi0Fly vkMg== X-Gm-Message-State: AC+VfDwBwh5xNFI7/jo4sv4kOe9JIZlhgHpdWAIRpcL8e1lK5hRF3ppc GqPgzaZalsmVm2KMX6htTOPrINBs8xxkYtHb X-Google-Smtp-Source: ACHHUZ5FnHS6VxepVjb9/rjvTp0z86YeY335fTWjusbIJjBDsVpzHtLGgO6txg/uL4/M79gscdYIbQ== X-Received: by 2002:a17:907:2d14:b0:96f:e7cf:5004 with SMTP id gs20-20020a1709072d1400b0096fe7cf5004mr5420023ejc.73.1687026842402; Sat, 17 Jun 2023 11:34:02 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id i8-20020a170906a28800b009655eb8be26sm12329365ejz.73.2023.06.17.11.34.01 for <64135@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jun 2023 11:34:02 -0700 (PDT) Message-Id: In-Reply-To: References: From: Liliana Marie Prikler Date: Sat, 17 Jun 2023 19:08:08 +0200 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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))))