From patchwork Thu Jul 27 08:35:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ekaitz Zarraga X-Patchwork-Id: 52231 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 2EE2927BBE9; Thu, 27 Jul 2023 10:04:17 +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_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 3263B27BBE2 for ; Thu, 27 Jul 2023 10:04:14 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOwUZ-0004y7-VW; Thu, 27 Jul 2023 04:37: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 1qOwUY-0004xz-5f for guix-patches@gnu.org; Thu, 27 Jul 2023 04:37:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOwUX-0001s1-Tk for guix-patches@gnu.org; Thu, 27 Jul 2023 04:37:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qOwUX-0001o1-QF for guix-patches@gnu.org; Thu, 27 Jul 2023 04:37:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64891] [PATCH] gnu: Add hare Resent-From: Ekaitz Zarraga Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 27 Jul 2023 08:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64891 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64891@debbugs.gnu.org X-Debbugs-Original-To: "guix-patches@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.16904469746883 (code B ref -1); Thu, 27 Jul 2023 08:37:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Jul 2023 08:36:14 +0000 Received: from localhost ([127.0.0.1]:40705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOwTm-0001mx-1l for submit@debbugs.gnu.org; Thu, 27 Jul 2023 04:36:14 -0400 Received: from lists.gnu.org ([2001:470:142::17]:50650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOwTi-0001mi-QX for submit@debbugs.gnu.org; Thu, 27 Jul 2023 04:36:12 -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 1qOwTc-0004vt-7d for guix-patches@gnu.org; Thu, 27 Jul 2023 04:36:04 -0400 Received: from mail-0301.mail-europe.com ([188.165.51.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOwTY-0001kk-7A for guix-patches@gnu.org; Thu, 27 Jul 2023 04:36:03 -0400 Date: Thu, 27 Jul 2023 08:35:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=protonmail2; t=1690446953; x=1690706153; bh=JD+smJ5pZ9YdH522XMJ9dGTJBAF4+jCFlV9SlHHRhD8=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=Y/YVuowluCHTCwWe0jk75w/xfWJxpgAXColjFEwUtKxd8fYNsmqVLm7PQTvQopI+A cYcQKt1/7saKaMcy2tbvTcZWFhbPC5kce+BUMMq37hAKhm5uPOsMhEG6rh//0i9ilY mhdP7wUuBr9jcPMaxaV5rBSyziK/zrRGU2jrEhVi4NJnNsi1LdTNoUPNxVRT8uPfYs CaLzZ9wK7Cc/cGWgp6KDIwC0JViSN2Y85ANwWqNXMkQADQV2Ft8Wluxpnovu4fk29n 8GEG5AIScJHYsufFjkVFlw/tvS89Vr/8ATSKRtH0qg3kpRmfTstp8wSdDWK6/DoIF/ c49/bqqd72gdg== From: Ekaitz Zarraga Message-ID: Feedback-ID: 3263582:user:proton MIME-Version: 1.0 Received-SPF: pass client-ip=188.165.51.139; envelope-from=ekaitz@elenq.tech; helo=mail-0301.mail-europe.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, 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-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 From 308b67848e93a25f627dd64e024e9a501979a157 Mon Sep 17 00:00:00 2001 Message-Id: <308b67848e93a25f627dd64e024e9a501979a157.1689368739.git.ekaitz@elenq.tech> From: Ekaitz Zarraga Date: Fri, 14 Jul 2023 22:52:59 +0200 Subject: [PATCH] gnu: Add hare * gnu/packages/hare.scm (hare, harec): New variable. * gnu/local.mk: Add hare.scm --- gnu/local.mk | 2 + gnu/packages/hare.scm | 104 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 gnu/packages/hare.scm base-commit: 917a299831361f253ea664f009176b4bbe06900a diff --git a/gnu/local.mk b/gnu/local.mk index 06a376a99a..4d1645c595 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -59,6 +59,7 @@ # Copyright © 2023 Zheng Junjie <873216071@qq.com> # Copyright © 2023 Ivana Drazovic # Copyright © 2023 Andy Tai +# Copyright © 2023 Ekaitz Zarraga # # This file is part of GNU Guix. # @@ -314,6 +315,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/gv.scm \ %D%/packages/gxmessage.scm \ %D%/packages/hardware.scm \ + %D%/packages/hare.scm \ %D%/packages/haskell.scm \ %D%/packages/haskell-apps.scm \ %D%/packages/haskell-check.scm \ diff --git a/gnu/packages/hare.scm b/gnu/packages/hare.scm new file mode 100644 index 0000000000..0c65463e92 --- /dev/null +++ b/gnu/packages/hare.scm @@ -0,0 +1,104 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2023 Ekaitz Zarraga +;;; +;;; 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 packages) + #:use-module (guix utils) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages c) + #:use-module (gnu packages man)) + +(define-public harec + (let ((revision "1") + (commit "f5da14c17f734f0bba5a741997b79d3e65a87712")) + (package + (name "harec") + (version (git-version "0.0.1" 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 "1xdf9pdwy5dvxhgvw6hqkpnjl8z76xc413vsnbbqfvwmfing53yn")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'setenv + (lambda _ + (setenv "CC" ,(cc-for-target)))) + (add-after 'configure 'configure-better + (lambda* (#:key outputs #:allow-other-keys) + (invoke "./configure" + (string-append "--prefix=" (assoc-ref outputs "out"))))) + (delete 'configure)))) + (inputs (list qbe scdoc)) + (synopsis "Bootstrapping compiler for Hare") + (description "Hare is a systems programming language designed to be +simple, stable, and robust. Hare uses a static type system, manual memory +management, and a minimal runtime. It is well-suited to writing operating +systems, system tools, compilers, networking software, and other low-level, +high performance tasks.") + (home-page "https://git.sr.ht/~sircmpwn/harec") + (license license:gpl3)))) + + +(define-public hare + (let ((revision "1") + (commit "112b75eb56d98c442094966fe59cbf3cd5feb909")) + (package + (name "hare") + (version (git-version "0.0.1" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.sr.ht/~sircmpwn/hare") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0ilnz56757k4v0ggdc2v4xsjw0c944y8r289nfmqhw4hwzsrvb4j")))) + (inputs (list scdoc)) + (propagated-inputs (list qbe harec)) + (build-system gnu-build-system) + (arguments + `(#:make-flags `("HARECACHE=./cache" + ,(string-append "PREFIX=" (assoc-ref %outputs "out"))) + #:phases + (modify-phases %standard-phases + (add-before 'configure 'configure-make + (lambda _ + ;; NOTE: We are not really using this because overwriting it via + ;; `make-flags` is way easier with our tooling. + ;; Maybe we should? + (copy-file "config.example.mk" "config.mk"))) + (delete 'configure)))) + (synopsis "Hare build driver") + (description "Hare is a systems programming language designed to be +simple, stable, and robust. Hare uses a static type system, manual memory +management, and a minimal runtime. It is well-suited to writing operating +systems, system tools, compilers, networking software, and other low-level, +high performance tasks.") + (home-page "https://git.sr.ht/~sircmpwn/hare") + (license license:gpl3))))