From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id s+O7D4asq2FoKgEAgWs5BA (envelope-from ) for ; Sat, 04 Dec 2021 18:59:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KBfACoasq2EsBgAAbx9fmQ (envelope-from ) for ; Sat, 04 Dec 2021 17:59:34 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0E39A24AC3 for ; Sat, 4 Dec 2021 18:53:19 +0100 (CET) Received: from localhost ([::1]:44810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtZDq-0004OC-8Q for larch@yhetil.org; Sat, 04 Dec 2021 12:53:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtZDa-0004Nz-O3 for guix-patches@gnu.org; Sat, 04 Dec 2021 12:53:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:43346) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtZDZ-0006ZC-UP for guix-patches@gnu.org; Sat, 04 Dec 2021 12:53:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mtZDZ-0004VJ-TN for guix-patches@gnu.org; Sat, 04 Dec 2021 12:53:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52280] [PATCH] gnu: Add guile-smc Resent-From: poptsov.artyom@gmail.com (Artyom V. Poptsov) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 Dec 2021 17:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52280 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52280@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163864034817272 (code B ref -1); Sat, 04 Dec 2021 17:53:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 Dec 2021 17:52:28 +0000 Received: from localhost ([127.0.0.1]:54892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtZD2-0004UV-A7 for submit@debbugs.gnu.org; Sat, 04 Dec 2021 12:52:28 -0500 Received: from lists.gnu.org ([209.51.188.17]:46434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtZCx-0004UK-Gi for submit@debbugs.gnu.org; Sat, 04 Dec 2021 12:52:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtZCw-0004Kt-To for guix-patches@gnu.org; Sat, 04 Dec 2021 12:52:22 -0500 Received: from [2a00:1450:4864:20::236] (port=39513 helo=mail-lj1-x236.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtZCu-0006V1-VB for guix-patches@gnu.org; Sat, 04 Dec 2021 12:52:22 -0500 Received: by mail-lj1-x236.google.com with SMTP id m12so12571166ljj.6 for ; Sat, 04 Dec 2021 09:52:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:user-agent:mime-version; bh=X1Wy6G+ifv0mfodKmMVumYFbxB9oxY++m6g1YObR3nI=; b=VvyStzBBWl+WiPJ7FMyvdzfxEOqJ9j+94saER6m5eq7C/rLhQpyl67Ag91fxDS71pi 8g9bpwvUc/ftNCTq3WbxWAG8JcZNxrIB3wxtDIqYt83sNNB6h7hziPeRjpjo5DbouAq7 f/vSgR0DrYPw8Qfasqx4dCkpRqkG5/cZvBfsaPZsbjV7ErEH9UMHdwQx96le9Jv4KU8h 2c8GW6I7e9dF+MaNQEqvUA0ULCu4SSIIO+7xErCksmY+3vG5Xz2qaV05rEUOAZfiS3ok Usz9WO5sbftmnjK1gkk8KeU2EMq76knB61yhRoCfmttgUPhOOxLLUczIVM1FWdjtVtls pQxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=X1Wy6G+ifv0mfodKmMVumYFbxB9oxY++m6g1YObR3nI=; b=OCJ9krh64qhG5xC4cKi0csCnlgabHoQ0BJ9oEZ+UAnY+tAHSYylY28qAh1iJjVPAA5 /+RSXpR2IRWfSopDMtg8TVU/VZbHdK/2jL72fa/u76q9h16iHCfvFv3QxIxNXprBYUmK Ehkzl4YtqrggdOEzycAwBqSVNgD1hk6X6TcNNoh5F5vzRGgeWS9vPtvGYeFGLcyQGHuB VAXm4ysk6uGBwEA3pBLPaW4QEXw1nxNnoFoBHSaQnm1EEi44LjBuM0tSEFuo97jasx5h mN8tBnA6jBIBwgITOY9B8okwfGR64a/YyVUQSCpRSHb/op4uC9eJJMCykt3HBFK+LdJv dt7w== X-Gm-Message-State: AOAM5300TPFROGv6oKU71PsqXRPVB0Tp94nU5mT86C+PQp+HLQefN/uS we8qImfpzPfXMi75wnF7/+nnjSSFS4M= X-Google-Smtp-Source: ABdhPJxlFddYNupfv1jh49CBpgCSAnqz9tbFTqo7ICVHOGTF0xOR17/fwPQteZiJxwEz1KWlhwCmag== X-Received: by 2002:a2e:7819:: with SMTP id t25mr25934601ljc.374.1638640338826; Sat, 04 Dec 2021 09:52:18 -0800 (PST) Received: from elephant ([5.164.193.196]) by smtp.gmail.com with ESMTPSA id bi34sm829290lfb.12.2021.12.04.09.52.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Dec 2021 09:52:18 -0800 (PST) From: poptsov.artyom@gmail.com (Artyom V. Poptsov) Date: Sat, 04 Dec 2021 20:52:12 +0300 Message-ID: <87lf106ywj.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::236 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::236; envelope-from=poptsov.artyom@gmail.com; helo=mail-lj1-x236.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1638640399; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=X1Wy6G+ifv0mfodKmMVumYFbxB9oxY++m6g1YObR3nI=; b=KlK3ni2pQfHnpuqxHPCEJJIT46zvHpzhDiT5m+e/MsflXe5lT7emrQh2MhubMUm2eT7f18 M4zXT9M4Rdye/qLjdnvzkDI9jR3Vf6+Vmxf4c4rSS72eTeGspmylfnzBG6j5y6o8Qf1vBW GDLoZNU+ZfVhSlI3oihLSO7rgKVgYtWJC8AmgR51u5w5tSW0R8F52sW7YuqtyIOtSoal8b fw8k9mSRuIMHSUE91ZpRBFG9/Z4b01PSur4pMqmze9dqT3BpgXOStdg9pHtdmHtSs0cf1r 4msoJ9uTbtQrmYwYgFCQqAlcwkDoyOdJvnpxNvowokn8qNpoJ7xk7b8hNnZwtA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638640399; a=rsa-sha256; cv=none; b=LFxI0p1p38W31lnW3LOk2MuJaOMtwXHvKlWQv0B2cGmOcEBUn7ovlSyJ37scrFX1Hp6sJ9 iltEit5BF8T58wSkhWPwXIL+XdATH10By6tTFJCsFeDZhvUnCovbb/oxvNM29D2JK6grX9 o+y2d/Tx1IqPdkIWiBUZxMVHlE0OEl459KbupGLKoCcwS2PPf5sX02YE7TnCC6HcX2+BDZ 9WggQp98fp/n98yg3tcYjHQ+B/ugNIRuehHPiYf1goAbcKuyE8DC3tobnDPwTd2t9Jef1t 4iW+Wm6hWm8fdboNuOKRPWOkwFEFwCKldqdxMohfigVanQMHePWmEZ3FcFddNQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=VvyStzBB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.13 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=VvyStzBB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0E39A24AC3 X-Spam-Score: -4.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: pxxtT572JLzN --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hello Guixers, this patch adds Guile-SMC[1] -- the GNU Guile State Machine Compiler. Thanks, - Artyom References: 1: https://github.com/artyom-poptsov/guile-smc --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-gnu-Add-guile-smc.patch Content-Transfer-Encoding: quoted-printable From=20b3ad6d1c8973647a4dd2efedaa6d70957429f5e2 Mon Sep 17 00:00:00 2001 From: "Artyom V. Poptsov" Date: Sat, 4 Dec 2021 20:40:46 +0300 Subject: [PATCH] gnu: Add guile-smc * gnu/packages/guile-xyz.scm (guile-smc): New variable. =2D-- gnu/packages/guile-xyz.scm | 88 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index cbc3ffa595..1b1acc637c 100644 =2D-- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -58,6 +58,7 @@ (define-module (gnu packages guile-xyz) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) + #:use-module (gnu packages admin) #:use-module (gnu packages algebra) #:use-module (gnu packages aspell) #:use-module (gnu packages autotools) @@ -4856,3 +4857,90 @@ high-level API for network management that uses rtne= tlink.") as well as the @samp{gitlab-cli} command line tool for interacting with a GitLab instance.") (license license:gpl3))) + +(define-public guile-smc + (package + (name "guile-smc") + (version "0.3.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/artyom-poptsov/guile-smc") + (commit (string-append "v" version)))) + (file-name (string-append name "-" version)) + (sha256 + (base32 + "0szkjmasi70m1vppck7nhdxg4lnxzjq6mihi6r1552s8sxm5z008")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags '("GUILE_AUTO_COMPILE=3D0") ;to prevent guild warn= ings + #:modules (((guix build guile-build-system) + #:select (target-guile-effective-version)) + ,@%gnu-build-system-modules) + #:imported-modules ((guix build guile-build-system) + ,@%gnu-build-system-modules) + #:phases + (modify-phases %standard-phases + (delete 'strip) + (add-after 'configure 'patch + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "modules/smc/core/log.scm" + ((" #:use-module \\(logging logger\\)") + (string-append + " #:use-module (logging logger)\n" + " #:use-module (logging rotating-log)")) + (("#:init-value \"logger\"") + (format #f + "#:init-value \"~a/bin/logger\"" + (assoc-ref inputs "inetutils"))) + (("\\(add-handler! %logger %syslog\\)") + (string-append + "(add-handler! %logger\n" + " (make \n" + " #:file-name \"smc.log\"))\n"))) + #t)) + (add-after 'install 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (guile-lib (assoc-ref inputs "guile-lib")) + (version (target-guile-effective-version)) + (scm (string-append "/share/guile/site/" + version)) + (go (string-append "/lib/guile/" + version "/site-ccache"))) + (wrap-program (string-append bin "/smc") + `("GUILE_LOAD_PATH" prefix + (,(string-append out scm) + ,(string-append guile-lib scm))) + `("GUILE_LOAD_COMPILED_PATH" prefix + (,(string-append out go) + ,(string-append guile-lib go))))) + #t))))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("pkg-config" ,pkg-config) + ("texinfo" ,texinfo))) + (inputs + `(("bash" ,bash-minimal) + ("guile" ,guile-3.0) + ("guile-lib" ,guile-lib) + ("inetutils" ,inetutils))) + (home-page "https://github.com/artyom-poptsov/guile-smc") + (synopsis "GNU Guile state machine compiler.") + (description + "Guile-SMC is a state machine compiler that allows to describe finite +state machines (FSMs) in Scheme in terms of transition tables. It is capa= ble +to generate such transition tables from a @url{https://plantuml.com/, +PlantUML} state diagrams. + +A transition table can be verified and checked for dead-ends and infinite +loops. Also Guile-SMC FSMs gather statistics when they run. + +Guile-SMC comes with a Scheme program called @command{smc} -- a state mach= ine +compiler itself. It produces a Scheme code for an FSM from the PlantUML +format. This tool is meant to be called on a PlantUML file when a program +with a FSM is being built (for example, from a Makefile.)") + (license license:gpl3))) =2D-=20 2.25.1 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 Artyom "avp" Poptsov Home page: https://memory-heap.org/~avp/ CADR Hackerspace co-founder: https://cadrspace.ru/ GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmGrqswACgkQ6cWi2QiY oC/2AQgAjWm9dG1oTRX5Y1YnRZ1Tx+d3mzVSqeFdBGVdh0vnXSm4KBpqCr92fdKn P8n8f4zEpVVhaAtBBpejrX+x+BfmWeQ5kpcWpDcZSxXk5ZF83wbjyzfQH/u+CqIG A4co3UwHI9b8yHGSyH4d1KqBV9Pb5PLw80EGs1QuqjfOz9Q38zKLYCmTUYJ68ZYa tCDpu3dCDpVDyqKdhjESHTgf6obXN/j1BGhkxbsFZbkPccfw2nYRLrC9tHd2O1dZ 6Y+jxmBgDXTkvWbTs4P4kJ13apkvuD2XDQuWLt0Rqo7hSFEqV6wS2uLxQ5FQl/5u 7NHa/eHdcdUgwpuIk2hVeNtU/8CSHQ== =BT0l -----END PGP SIGNATURE----- --==-=-=--