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 KI34Ls0zjGKFdwEAbAwnHQ (envelope-from ) for ; Tue, 24 May 2022 03:24:29 +0200 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 CDXQLs0zjGKxvgAAauVa8A (envelope-from ) for ; Tue, 24 May 2022 03:24:29 +0200 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 26C453BC88 for ; Tue, 24 May 2022 03:24:29 +0200 (CEST) Received: from localhost ([::1]:50324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntJHg-0002Ut-B0 for larch@yhetil.org; Mon, 23 May 2022 21:24:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntJHH-0002Ko-AO for guix-patches@gnu.org; Mon, 23 May 2022 21:24:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56610) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntJHH-00065X-1T for guix-patches@gnu.org; Mon, 23 May 2022 21:24:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ntJHG-0001dn-UH for guix-patches@gnu.org; Mon, 23 May 2022 21:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55606] [PATCH 2/2] gnu: Add hare. Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 24 May 2022 01:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55606 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55606@debbugs.gnu.org Cc: Antero Mejr X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16533554046242 (code B ref -1); Tue, 24 May 2022 01:24:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 May 2022 01:23:24 +0000 Received: from localhost ([127.0.0.1]:50505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntJGa-0001cY-Hp for submit@debbugs.gnu.org; Mon, 23 May 2022 21:23:24 -0400 Received: from lists.gnu.org ([209.51.188.17]:49730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntJGX-0001cP-3N for submit@debbugs.gnu.org; Mon, 23 May 2022 21:23:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntJGW-0002In-U0 for guix-patches@gnu.org; Mon, 23 May 2022 21:23:16 -0400 Received: from mout-p-103.mailbox.org ([2001:67c:2050:0:465::103]:35994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1ntJGU-00062s-OY for guix-patches@gnu.org; Mon, 23 May 2022 21:23:16 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4L6bzy4RXVz9sr0 for ; Tue, 24 May 2022 03:23:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1653355390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CLQh98odlV6anGWnxgdJf22OGSDYTNPTDbRXk82ZmTE=; b=jXPZxO/rHKkBThhoRmFzAZWnJePZL2+WA98SVM+PZKj38rUfVJiaRuTGMeAlwMExtFXgDA 7XKdGvErmZYGZVM4ZWJcxX8w/v/Dp/CFJkN8AxO3E8cK7HDRTI0zJWmByDFQfRh8NIgRac ys0iDBIY0gnkadQaKMwsLlJwf7wGPGO0OzKmFMicPc+YKauOmWL95SERbkhhKq00BlyWQw FbFNzJWa5/sRqSYubMgn4O7rIXqYd6byq0PaJHKNPlyJORV9LJnZVzgP0ZFAYrVA1j8nZx CsZF0CyQslCK2CPV9GJ2USzQTr9WRMBKX2nZe4pSl79pElT9r3b/m+ctXWx/HA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1653355388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CLQh98odlV6anGWnxgdJf22OGSDYTNPTDbRXk82ZmTE=; b=VWJw4aLLnuChYhgMmmwz2ykaq8vrN9jNkBwraHnsd9i2Et6XjW+txCHFEzTyhQrl2ljvbZ I034Gw0sf5HL7pKHxci4Xz9gvvkBE3FsSCbHHZObVCrZ5BxLo9IKSDgpHbcpq9k0YAdDeC G89ckuL4S3uC53hjkXeUrHf9VgtEk9kiKu+9vbECdsc8e3Q44by7869Fv5AUFGAzME/wlz cTdT5kggMEpZXIGsMlkjSxK9WS5jYN5XLLhEziOezzr6x1WK4mbvIN+s63JNreMpk79Eka ymGWVI3tcf9Xu6QpwxzrOsIsDD6yYOboS2m0rz78YBPL5Tqs0W6VY5KhnJic+g== Date: Mon, 23 May 2022 21:21:55 -0400 Message-Id: <20220524012155.48729-2-antero@mailbox.org> In-Reply-To: <20220524012155.48729-1-antero@mailbox.org> References: <20220524012155.48729-1-antero@mailbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MBO-RS-META: hhq7nti1oieat1f4ukc1q5o69ajqtwa5 X-MBO-RS-ID: b1dac82452a8b45a415 X-Rspamd-Queue-Id: 4L6bzy4RXVz9sr0 Received-SPF: pass client-ip=2001:67c:2050:0:465::103; envelope-from=antero@mailbox.org; helo=mout-p-103.mailbox.org 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, 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-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" Reply-to: Antero Mejr X-ACL-Warn: , Antero Mejr via Guix-patches From: Antero Mejr via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653355469; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=CLQh98odlV6anGWnxgdJf22OGSDYTNPTDbRXk82ZmTE=; b=a1kpJwXfhVHIXjiNXdP0bqwP8m6A2cs0wWtlcwkG8DvepmyXQx7ffHvleKvlRxqVY8cgco inOrud3xipK5ejUDhGCGr0KZpaVk9nYME28RENkXpILBgjC3H4dQEmHLKpm4NwdxsuTxOR XNugcLUBECRb1BiODvXnvet06o+SDJNzvN79Xp9Dqxlxpjuc69UlaUIg0l5vdJdL9rQhg8 VZPW4USJyXrNWUlHcp4Hy7uTDkXofbYzCspHaZMdKUQHSfuqNOKE7TrTD7xYusVXWLRbVT xgm0X001oOvHGPB8bqrQ5IGqzHQpEi7ojS44l1eSRJD8F9+s5xWCyEAObCZpqg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653355469; a=rsa-sha256; cv=none; b=ODGFPYSTXDIRjSUo+gC/J5QZp1d8cwdlLUBW73H02j33lz/wKJVy0fCYs39xZFDBTLf+fp bw7TazRz55pg/rQIY+buf7T+upwnWGgz0HFRcqRHSrV1vsIpb87SpV1OToBlcppGvVgLp7 YG8cGNY2n53rZlkUjnWUIP7AXxrmOxYE6EoKESZYmcPqzTbiXVOsR2JL65Bbwim7/ac+/T IEH1QbEvbTDeqXdn/5CLDrsC4JyPivAhEqhIdk1r8ucgGCxb0PmUD+vCTCVxu6t3+jQ+Df aUcD5KvufvSFM/VnlJ84Izhxz34Sy/BNJhkYvNC1yxLuNHzGwuqGBWhnJsZFcQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b="jXPZxO/r"; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=VWJw4aLL; dmarc=pass (policy=none) header.from=gnu.org; 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: -3.85 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b="jXPZxO/r"; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=VWJw4aLL; dmarc=pass (policy=none) header.from=gnu.org; 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: 26C453BC88 X-Spam-Score: -3.85 X-Migadu-Scanner: scn0.migadu.com X-TUID: qF5SA2B68E1e * gnu/packages/hare.scm (hare): New variable. --- Guix style was indenting badly when applied to the hare package, putting the text far past 80 characters. Corrected it by hand. gnu/packages/hare.scm | 136 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 gnu/packages/hare.scm diff --git a/gnu/packages/hare.scm b/gnu/packages/hare.scm new file mode 100644 index 0000000000..5936056fda --- /dev/null +++ b/gnu/packages/hare.scm @@ -0,0 +1,136 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Antero Mejr +;;; +;;; 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 hare) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system gnu) + #:use-module (guix download) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (guix utils) + #:use-module (gnu packages base) + #:use-module (gnu packages c) + #:use-module (gnu packages man) + #:use-module (gnu platform)) + +(define-public harec + (let ((commit "43b34048dd83bde5d4d2a7d93d37a593a9c12fda") (revision "0")) + (package + (name "harec") + (version (git-version "0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.sr.ht/~sircmpwn/harec") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0502xw96za7bvnqvh6jhfjwrw4ddqwppr4ihcn9f5jvjpgw95284")))) + (native-inputs (list qbe)) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;no test suite + #:make-flags + (list (string-append "CC=" + ,(cc-for-target)) + (string-append "DESTDIR=" + (assoc-ref %outputs "out")) "PREFIX=") + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key configure-flags #:allow-other-keys) + (setenv "QBE" + (string-append (assoc-ref %build-inputs "qbe") + "/bin/qbe")) + ;; configure rejects unrecognized options + (apply invoke "./configure" configure-flags)))))) + (home-page "https://harelang.org") + (synopsis "Hare bootstrap compiler") + (description "Hare compiler written in C11 for POSIX-compatible +systems.") + (license license:gpl3+)))) + +(define-public hare + (let ((commit "5af4fbd5f2f552da47af0f8f765050e49b0ae73f") (revision "0")) + (package + (name "hare") + (version (git-version "0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.sr.ht/~sircmpwn/hare") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1gj2v5p73f8y5gpglm6mmfdadc6ih2bnd80nyax1xipsfy0f82di")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list (string-append "DESTDIR=" (assoc-ref %outputs "out")) + "BINDIR=/bin" + "MANDIR=/share/man" + "SRCDIR=/src" + "LOCALSRCDIR=/src/hare" + (string-append "HAREPATH=" + (assoc-ref %outputs "out") + "/src/hare/stdlib:" + (assoc-ref %outputs "out") + "/src/hare/third-party") + (string-append "PLATFORM=" "linux") + (string-append "ARCH=" + ,(platform-linux-architecture + (lookup-platform-by-target-or-system + (or (%current-target-system) + (%current-system))))) + (string-append "HAREC=" + (string-append (assoc-ref %build-inputs "harec") + "/bin/harec")) + "HAREFLAGS=" + (string-append "QBE=" + (string-append (assoc-ref %build-inputs "qbe") + "/bin/qbe")) + (string-append "AS=" + (string-append (assoc-ref %build-inputs "binutils") + "/bin/as")) + (string-append "LD=" + (string-append (assoc-ref %build-inputs "binutils") + "/bin/ld")) + (string-append "AR=" + (string-append (assoc-ref %build-inputs "binutils") + "/bin/ar")) + (string-append "SCDOC=" + (string-append (assoc-ref %build-inputs "scdoc") + "/bin/scdoc")) + "HARECACHE=.cache") + #:phases + (modify-phases %standard-phases + (delete 'configure) ;No configuration script. + ;; Use own make-flags instead of `config.mk`. + (add-before 'build 'dont-include-config-mk + (lambda _ + (substitute* "Makefile" + (("include config.mk") "")) #t))))) + (native-inputs (list scdoc)) + (propagated-inputs (list harec qbe binutils)) + (home-page "https://harelang.org") + (synopsis "Compiler for the Hare programming language") + (description "Hare is a systems programming language.") + (license (list license:gpl3+ license:mpl2.0))))) -- 2.36.1