From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EMwWF2yF+2MIQwAAbAwnHQ (envelope-from ) for ; Sun, 26 Feb 2023 17:14:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eJ0UF2yF+2PvaAEAauVa8A (envelope-from ) for ; Sun, 26 Feb 2023 17:14:36 +0100 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 EF3C32ECC0 for ; Sun, 26 Feb 2023 17:14:35 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWJf0-0001GG-SW; Sun, 26 Feb 2023 11:14:02 -0500 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 1pWJf0-0001G8-2F for guix-patches@gnu.org; Sun, 26 Feb 2023 11:14:02 -0500 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 1pWJez-0007IN-Qm for guix-patches@gnu.org; Sun, 26 Feb 2023 11:14:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pWJez-0004LS-L2 for guix-patches@gnu.org; Sun, 26 Feb 2023 11:14:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59997] [PATCH v4] gnu: add minimacy Resent-From: Konrad Hinsen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 26 Feb 2023 16:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59997 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59997@debbugs.gnu.org Received: via spool by 59997-submit@debbugs.gnu.org id=B59997.167742799916639 (code B ref 59997); Sun, 26 Feb 2023 16:14:01 +0000 Received: (at 59997) by debbugs.gnu.org; 26 Feb 2023 16:13:19 +0000 Received: from localhost ([127.0.0.1]:44887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWJeI-0004KI-P1 for submit@debbugs.gnu.org; Sun, 26 Feb 2023 11:13:19 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:57695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWJeF-0004K4-FQ for 59997@debbugs.gnu.org; Sun, 26 Feb 2023 11:13:16 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 5F4845C010B; Sun, 26 Feb 2023 11:13:10 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 26 Feb 2023 11:13:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1677427990; x= 1677514390; bh=pmwlnuQnSs9IBgoR4h8M/njcvcisl/P8+f3o6iUZd8E=; b=F KZfOBO2v+WKCKRB8zxQNA+5JibbsoT4BfyVkrN8hpEtZFHOTkhhmNX8PRn+ouJtG jTwhw4StTlp+zX5XLdrzhJpG05yM81vrNFA3Jp/H0+wti97u8X4e4G5vBy7WS5q9 uhtt8Ec/9gdos8JTQixHkQhyFkwdElBQ1/w4w8hFHC0By5/BAFTobc4CdkdPBZXl ljEXXy1xQo5baLv6c1vm9qryUg0/kqH+mg5n7h83fQfXsUcYqB1vuDJ+E4ju3tAe TBBPw7BETxxizS+E/LsuroWfpdY8mIuEe5mAW5L5ooqf26O7GHd8lGkLh4oPQrut IWVDJfK7sr6mzD5KYA/EA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1677427990; x=1677514390; bh=p mwlnuQnSs9IBgoR4h8M/njcvcisl/P8+f3o6iUZd8E=; b=BU/4kpaMPTHtqeqeP HJoXp0SCLKCbTwJpl9RJruIDUH8Li4kkuA6kR0bIrJKl+f/As9sfpxR5sK9PuHL+ Ij52wdoIksGq0bShaPuBOPxKoHDf+KjyWyEpvNPVjIZWoKRbyAbFfz38ITwQM5zQ zLpYprYn+nn1wi50kvgOp06slVyEPnw8p+JHO2+1vLl3KDg5i2iTJGj4XOzmitNo 5NokkUSdbx5ERhVZObegdJAzoHNobJxIkf+YNDP2ymrUNt2CNdbkVpDU12lzask6 p6jT6mD+QfCsiFfEFZM0hlQlYVtoC8DC5we1Q+jya/XVA/zhW1wANzTfPSn5Rq3B dfRbQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudekkedgiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufhffjgfkfgggtgfgsehtqh ertddtreejnecuhfhrohhmpefmohhnrhgrugcujfhinhhsvghnuceokhhonhhrrggurdhh ihhnshgvnhesfhgrshhtmhgrihhlrdhnvghtqeenucggtffrrghtthgvrhhnpeefhedtie fgteehveelieetieekudekffeugfevvdehveegiefgvdefteetkedvleenucffohhmrghi nhepghhnuhdrohhrghdpghhithhhuhgsrdgtohhmpdhmihhnihhmrggthidrnhgvthenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehkohhnrhgr ugdrhhhinhhsvghnsehfrghsthhmrghilhdrnhgvth X-ME-Proxy: Feedback-ID: i184641e2:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 26 Feb 2023 11:13:09 -0500 (EST) From: Konrad Hinsen References: <20230127192031.3142167-1-zimon.toutoune@gmail.com> Date: Sun, 26 Feb 2023 17:13:08 +0100 In-Reply-To: <20230127192031.3142167-1-zimon.toutoune@gmail.com> (Simon Tournier's message of "Fri, 27 Jan 2023 20:20:31 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fastmail.net header.s=fm1 header.b="F KZfOBO"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b="BU/4kpaM"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fastmail.net (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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677428076; a=rsa-sha256; cv=none; b=iSo29DH84wtmwahkHtEWkyh+0TTrliaC2bn90Q7uyPe3shll1zWaToBG+pugV2SwvqzRIO AQFo/tR1WZtYa1kJilpMB1PktXV+WXwtqR5FOLjXmDaCk3WDWbvJelxyHHJO+t415M5Ls9 6X091PX/atcG3ap4pSqNjwUcb4jU67ePiHy24AT21jJNONBayICZaeL2VAS+aa8SI0LTOO +Ya9eCLkwgUv3pKvLqf8MW6UbtWuwkP6nsIQD/KqTv3rRDDo5PeC73GGNQoHCCOm1KmwJu HC28KEYYtdmhBmKfDAmWvFJmQN/t4//ly916cWoJjH3G/WrW6M0BBg/5MxmNsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677428076; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=pmwlnuQnSs9IBgoR4h8M/njcvcisl/P8+f3o6iUZd8E=; b=E72hhi74F9COF0rx+43T+jELTzvhURpmIrJCiufpU97fWk7w9e3bEnFcTZTUiJDyC7IgI8 /JxJDiEMBJi1T4PMKJYCtjal0pRHvsq6lBEQl6ytxv5kR7RerKL0J8Czs0C+3rRuTkXLz1 HNmX6hQlnDHNJPjcPSRWuMvxWX469+OP1AGRXdPU7EATTAHLHce590DKw+HggJXb5fVoK/ 1WVLvcmwbcxov1lJzxeki/9YvJ+RIBTj2a3a9cdhP/mGvEhG3YeHngVcWMVLAu0AFXbCm+ /uadygtd44iKn/+yq6tAjRZtVcwoKjH9P/U9xdHT2BAyobOkMxiksUtoUbRPjQ== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fastmail.net header.s=fm1 header.b="F KZfOBO"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b="BU/4kpaM"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fastmail.net (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-Spam-Score: -2.19 X-Migadu-Spam-Score: -2.19 X-Migadu-Scanner: scn1.migadu.com X-Migadu-Queue-Id: EF3C32ECC0 X-TUID: YXBGfRyNRn98 * gnu/packages/minimacy.scm: New file. * gnu/packages/patches/minimacy.patch: New patch. * gnu/local.mk: Add them. --- gnu/local.mk | 2 + gnu/packages/minimacy.scm | 103 ++++++++++++++++++++++++++++ gnu/packages/patches/minimacy.patch | 34 +++++++++ 3 files changed, 139 insertions(+) create mode 100644 gnu/packages/minimacy.scm create mode 100644 gnu/packages/patches/minimacy.patch diff --git a/gnu/local.mk b/gnu/local.mk index 4ccf015316..c72f14b685 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -423,6 +423,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/packages/messaging.scm \ %D%/packages/minetest.scm \ %D%/packages/mingw.scm \ + %D%/packages/minimacy.scm \ %D%/packages/microcom.scm \ %D%/packages/moe.scm \ %D%/packages/mold.scm \ @@ -1548,6 +1549,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/mingw-w64-reproducible-gendef.patch \ %D%/packages/patches/minisat-friend-declaration.patch \ %D%/packages/patches/minisat-install.patch \ + %D%/packages/patches/minimacy.patch \ %D%/packages/patches/mit-krb5-hurd.patch \ %D%/packages/patches/mixxx-link-qtscriptbytearray-qtscript.patch \ %D%/packages/patches/mixxx-system-googletest-benchmark.patch \ diff --git a/gnu/packages/minimacy.scm b/gnu/packages/minimacy.scm new file mode 100644 index 0000000000..2a04d7c117 --- /dev/null +++ b/gnu/packages/minimacy.scm @@ -0,0 +1,103 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2022 Konrad Hinsen +;;; +;;; 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 minimacy) + #:use-module (gnu packages) + #:use-module (gnu packages xorg) + #:use-module (gnu packages gl) + #:use-module (gnu packages linux) + #:use-module (guix download) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module (guix build-system gnu) + #:use-module (guix download) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages)) + +(define-public minimacy + (package + (name "minimacy") + (version "0.6.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ambermind/minimacy/") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1x9i1spf79lq3kxms55dx7lf8pl84cyblq313sjyfpr9l187ailb")) + (patches (search-patches "minimacy.patch")) + (modules '((guix build utils))) + (snippet '(delete-file-recursively "windows")))) + (build-system gnu-build-system) + (inputs (list libx11 libxext alsa-lib mesa glu)) + (outputs '("out" ; core + "gui" ; for GUI programs, with X11 and ALSA + "opengl")) ; for GUI programs, with X11, OpenGL, and ALSA + (arguments + (list + #:tests? #f ; no tests + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-path + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "src/hw.c" + (("minimacy-in-gnu-store") + (assoc-ref outputs "out"))))) + (delete 'configure) + (replace 'build + (lambda _ + (chdir "unix") + (invoke "make" "nox") + (for-each delete-file + (find-files "../obj" "\\.o$")) + (invoke "make" "x11") + (for-each delete-file + (find-files "../obj" "\\.o$")) + (invoke "make" "x11gl") + (chdir ".."))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (gui (assoc-ref outputs "gui")) + (opengl (assoc-ref outputs "opengl"))) + (mkdir-p (string-append out "/rom")) + (mkdir-p (string-append out "/system")) + (copy-recursively "rom" + (string-append out "/rom")) + (copy-recursively "system" + (string-append out "/system")) + (install-file "bin/minimacy" + (string-append out "/bin")) + (install-file "bin/minimacyX11" + (string-append gui "/bin")) + (install-file "bin/minimacyX11GL" + (string-append opengl "/bin")))))))) + (synopsis "Minimalist computing system") + (description + "Minimacy is a minimalist computing technology. +It consists of a programming language (compiler plus virtual machine) +and a library, written such that the whole system can be fully +understood by a single person. An optional extension to the virtual +machine adds X11 and ALSA for user interfaces, another extension +adds OpenGL support.") + (home-page "https://minimacy.net/") + (license license:gpl2))) diff --git a/gnu/packages/patches/minimacy.patch b/gnu/packages/patches/min= imacy.patch new file mode 100644 index 0000000000..eca49431c3 --- /dev/null +++ b/gnu/packages/patches/minimacy.patch @@ -0,0 +1,34 @@ +The Minimacy distribution is set up for being compiled and used from the +user's home directory. Running Minimacy as a Guix package requires adding +its store path as a search path for the virtual machine. That is done in +two steps: this patch, and a substitution of the actual store path in the +build process. + +--- minimacy/src/hw.c 2022-12-05 18:51:13.000000000 +0100 ++++ minimacy/src/hw.c 2022-12-09 15:55:47.122793826 +0100 +@@ -90,6 +90,13 @@ + #if defined ON_UNIX || defined ON_MACOS_CMDLINE || defined ON_RASPBERRY64 + void systemExecDir(char* path, int len) + { ++ char* p =3D "minimacy-in-gnu-store"; ++ if (strlen(p) < len - 2) ++ { ++ strcpy(path, p); ++ systemCleanDir(path); ++ return; ++ } + path[0] =3D 0; + } + #endif +@@ -583,8 +590,9 @@ + PRINTF(th, LOG_USER, "1- command line argument: -dir path\n"); + PRINTF(th, LOG_USER, "2- environment variable MINIMACY\n"); + PRINTF(th, LOG_USER, "3- grand parent of minimacy.exe (windows only)\n"); +- PRINTF(th, LOG_USER, "4- ~/minimacy (on Unix) or [user]/Documents/minima= cy (on Windows)\n"); +- PRINTF(th, LOG_USER, "5- Working directory\n\n"); ++ PRINTF(th, LOG_USER, "4- the minimacy package under /gnu/store (Guix onl= y)\n"); ++ PRINTF(th, LOG_USER, "5- ~/minimacy (on Unix) or [user]/Documents/minima= cy (on Windows)\n"); ++ PRINTF(th, LOG_USER, "6- Working directory\n\n"); + } + int hwInit(Thread* th, int argc, char** argv, int standalone) + { --=20 2.39.1