From unknown Sun Jun 15 01:09:45 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64135] [PATCH 0/2] Add miking Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Jun 2023 18:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64135 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64135@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168702655118177 (code B ref -1); Sat, 17 Jun 2023 18:30:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Jun 2023 18:29:11 +0000 Received: from localhost ([127.0.0.1]:52595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAaff-0004j7-0O for submit@debbugs.gnu.org; Sat, 17 Jun 2023 14:29:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:35724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAafd-0004iz-1R for submit@debbugs.gnu.org; Sat, 17 Jun 2023 14:29:10 -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 1qAafc-0002VZ-QC for guix-patches@gnu.org; Sat, 17 Jun 2023 14:29:08 -0400 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qAafb-0007LW-4y for guix-patches@gnu.org; Sat, 17 Jun 2023 14:29:08 -0400 Received: by mail-ej1-x643.google.com with SMTP id a640c23a62f3a-9827bd8e0afso305625766b.1 for ; Sat, 17 Jun 2023 11:29:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687026545; x=1689618545; h=mime-version:to:subject:date:from:message-id:from:to:cc:subject :date:message-id:reply-to; bh=M4sDgD+5SjmDFdvE3YELq5eEzapaq+yeT5rsMhPe3DQ=; b=C+AMN9i8c+hKQ11K8O6DzZz4NKWJngCdfADJBnRLtF6hGB/AQBAIc2Jxi0YrdB1j0k mkLmoxVRsjJ80yMKr/SrPZplr+pnDGQHtitNuwjVe87Tjc3K91sKF1N4qh3CZ96aGmrs 56CpsXv1+kKmtzSlVsEOOawdrCZj/BSQq8+aaLQCqgMSm8lssW0lZfkarIAdBWaukeWM vAlBRzv1LZrIdv++wKL9q4Xg85GV76CeJDGGqs7bsprLNWmRnnI171CmhqvunoIcbrmw MaiWpnMDp/SBgGF42AMl6T91Z63soZoGfGwgonluv+ramWCzSpoC1ZK6i4pqXsq4izq4 eKCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687026545; x=1689618545; h=mime-version:to:subject:date:from:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=M4sDgD+5SjmDFdvE3YELq5eEzapaq+yeT5rsMhPe3DQ=; b=EmkaGcFvYcZcVbDu97H8oST1umkxdHY5XbhPs7gr0SW+yWVVGaP1FtJBPde9Inm1Bd mOB5KKL9M5HIDKwII7OZaJVyQ2SXXur078y/cK4YisoFW9FEfM5w3g5uH9xBNjLPCPQe dE2OHLZI55IH2NkOou1OTsGAfuUeBDBslHTIy5vIlOyjj1ncj5aOP3Bkg2gTcWA9pT8L adPVLCWEObUvZBH5nVmtxJ70+p/6LiCwSBlYWTl8+gfu0r2zJZVszXN2UP0V3ItNyZxC wtiasg53jcrF0ogDMo9474maq8yefZiTbDZuqagn/R3iBlXVFLuKqZm1t9ft3SMJsjrR tSIg== X-Gm-Message-State: AC+VfDyICvEAw6ZAleS1ssoz7wMzNAfB2MbX/j0i7bHF6xy3lFkBWkyZ t+f7xwHTsqLCnw4xgnQeyFJyPJ6vilVN2d+r X-Google-Smtp-Source: ACHHUZ532cs6CKOIbeUmdkbY45lQujXnSulvhOax+PBYCtnHxyVSKTYdS/+2p/NV0eqj8rt16m0ccg== X-Received: by 2002:a17:907:9720:b0:973:df9c:b1aa with SMTP id jg32-20020a170907972000b00973df9cb1aamr5457900ejc.71.1687026545217; Sat, 17 Jun 2023 11:29:05 -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 lc20-20020a170906dff400b00970f0e2dab2sm12268059ejc.112.2023.06.17.11.29.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jun 2023 11:29:04 -0700 (PDT) Message-Id: From: Liliana Marie Prikler Date: Sat, 17 Jun 2023 19:25:54 +0200 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::643; envelope-from=liliana.prikler@gmail.com; helo=mail-ej1-x643.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi Guix, this series adds Miking, a framework for defining domain-specific languages, which has applications in object-oriented modeling (think OpenModelica, but less of a pain to bootstrap and with an ML-style syntax) and probabilistic programming. It does require some patches to drop the dreaded CUDA, but also to make the build work with Guix' setup where environment variables have a meaning, actually. Especially for the latter patch, I'm still trying to figure out how to best transform the build system into one that is usable with little overhead. Currently, I've snarfed just about enough information from the build files to run meaningful tests. Cheers Liliana Marie Prikler (2): gnu: Add miking-boot. gnu: Add miking. gnu/local.mk | 2 + gnu/packages/miking.scm | 127 ++++++++++++++++++ .../patches/miking-drop-acceleration.patch | 106 +++++++++++++++ .../patches/miking-preserve-OCAMLPATH.patch | 28 ++++ 4 files changed, 263 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 base-commit: 31336e9f5d68512a9c1c6826bce9f17c892a2125 -- 2.40.1 From unknown Sun Jun 15 01:09:45 2025 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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * 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 From unknown Sun Jun 15 01:09:45 2025 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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * 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 + -- 2.40.1