From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id wI9hJj5U1GaFdwEA62LTzQ:P1 (envelope-from ) for ; Sun, 01 Sep 2024 11:47:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id wI9hJj5U1GaFdwEA62LTzQ (envelope-from ) for ; Sun, 01 Sep 2024 13:47:10 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=Wo2AktYK; dkim=fail ("headers rsa verify failed") header.d=privacyrequired.com header.s=stigmate header.b=aEWz29Ud; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1725191230; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=JNzljCsdd8lArtLemjAVt2MQ67DvpL3uXm3NV2Ru29I=; b=J5QtndVSbaobDJr6WWbmgfCaD32s3GoOP52FfGl3t/CMIp0e5Q4738QcXoKULuQIzpYPBK 5BFH2Rh6MUBrP0irVeLM2wnJbeooYFtnhNvJbB1ymUNiA5KTj45gsQiuHG/fag4Tn0wJ2C GlsHitrHZKetVxclIvWbeKInPwECCIlSmQvUgWUeUM5l2R4uhtg55MS67uphZHmPcIN2Tl MoUknDooKIq8+OuiU0umNTVJz/6sBJJhxtPljHHFcIravMwDHXnkEPu3H9qjAdgyIi4dki HTuEjt4s3Du0hgbtfRgFoNqyLKK8wgOP3cA43+DoCr/IkA/5M4myLg2v2i4BBA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1725191230; a=rsa-sha256; cv=none; b=cMIKqQPnIfk5njrdHCfy3xIRsxEI91UXmGhR9lLI3a6R79lSuqcFeuSmUQwAWRIPREO/F3 KxmH8urGmhSiqgjCKBwDV12I8AFwNiJaPW9Alv9E4s5VFcx8GVzM36SrKzz7kBElQ7ofBu 5H/CDgHmgV9EwEt6jzt/uoMDBeDgbarOGP2sAktImh7On+0vnJKIn/qp/2+BV/flKWYXkF eFoc6by1vLAuX1oNXtF2npaeSGBhS0IpJ1WwElDF1sDVVSLbI7uY4EmyT0/H8C3ibygVKQ JEeX+4XgpSP2aNt63yoVoGqjdfHXGgLa/QdsYIPlr3+f3udBxamLRnaCjcJp6Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=Wo2AktYK; dkim=fail ("headers rsa verify failed") header.d=privacyrequired.com header.s=stigmate header.b=aEWz29Ud; 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" 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 348FB6E4B6 for ; Sun, 1 Sep 2024 13:47:10 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1skj2f-0006Tg-EF; Sun, 01 Sep 2024 07:46:51 -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 1skilT-0003wj-HM for guix-patches@gnu.org; Sun, 01 Sep 2024 07:29:03 -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 1skilT-0008Kf-8f for guix-patches@gnu.org; Sun, 01 Sep 2024 07:29:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=JNzljCsdd8lArtLemjAVt2MQ67DvpL3uXm3NV2Ru29I=; b=Wo2AktYKSnVnLiGK2g9vI8VvyR8VtgfQJQMg38IEKKBecD5GJ9Vl4VFglDMiv3iQrqmWTfWyIN646cffFv4he8/Kb+2Oz/YzVT+F/EsdXsE01Q8e3VWf8JNHqLvD11Wpz1QVALQBqlbRJ3thOYvsEDWceChKEQQ9xyIZNkfAXX/xtzsGxEr0ZuSq/J7inIuhhkyZdKg/4LnbxbOx3/DwKJ23JST5kE109SwmAcEggHulCPC+X7L9BKGF373gvRMtnmqaQEPNtQgIMNH5dkRNAZcJBNnZMyERA+Hx9ReGqZe91IxHAS0Msvgh7scm0iT3pvE+S3H1LPz+lWClmjnQMQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1skimQ-0004Im-GC for guix-patches@gnu.org; Sun, 01 Sep 2024 07:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72926] [PATCH] gnu: Add Hare toolchain and ecostuff. Resent-From: "Daniel [REDACTED]" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 01 Sep 2024 11:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72926 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72926@debbugs.gnu.org Cc: "Daniel \[REDACTED\]" X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172519020116506 (code B ref -1); Sun, 01 Sep 2024 11:30:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Sep 2024 11:30:01 +0000 Received: from localhost ([127.0.0.1]:34067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1skimN-0004I5-7j for submit@debbugs.gnu.org; Sun, 01 Sep 2024 07:30:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:55120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1skiaI-0003wA-3E for submit@debbugs.gnu.org; Sun, 01 Sep 2024 07:17:32 -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 1skiXD-00031F-NI for guix-patches@gnu.org; Sun, 01 Sep 2024 07:14:19 -0400 Received: from latitanza.investici.org ([82.94.249.234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1skiXA-0006XU-Ly for guix-patches@gnu.org; Sun, 01 Sep 2024 07:14:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=privacyrequired.com; s=stigmate; t=1725189245; bh=JNzljCsdd8lArtLemjAVt2MQ67DvpL3uXm3NV2Ru29I=; h=From:To:Cc:Subject:Date:From; b=aEWz29Ud8bpKmRr75+56R+ZzgUlGgdOpYb6URP3Kj2crjQJQHHvw71PAj8OrTM5OY IjEoA9MgFCj5GO6PUvjQEvVhLE2XMR4mH8wHr08L/OtvXEOagqYQPW4slDA4Dw8vuc 0HYCX9L5Lt682i4RhTRhzNAdFO2G3waqeSvbmxac= Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4WxTmF0mhWzGp55; Sun, 1 Sep 2024 11:14:05 +0000 (UTC) Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: lightpug@krutt.org) by localhost (Postfix) with ESMTPSA id 4WxTmD6kCmzGp52; Sun, 1 Sep 2024 11:14:04 +0000 (UTC) Date: Sun, 1 Sep 2024 14:13:58 +0300 Message-ID: <20240901111400.27130-1-pjals@privacyrequired.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=82.94.249.234; envelope-from=pjals@privacyrequired.com; helo=latitanza.investici.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 01 Sep 2024 07:29:58 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 01 Sep 2024 07:46:41 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: "Daniel \[REDACTED\]" X-ACL-Warn: , "Daniel \[REDACTED\] via Guix-patches" From: "Daniel \[REDACTED\] via Guix-patches" via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 348FB6E4B6 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -7.28 X-Spam-Score: -7.28 X-TUID: tXn/cTHryY88 * gnu/packages/hare.scm: New file. * gnu/packages/hare-xyz.scm: New file. * gnu/local.mk: Add these. * gnu/packages/hare.scm (%hare-build-arguments): New variable. (%hare-toolchain-build-arguments): New varible. (%hare-toolchain-version): New variable. (hare): New variable. (harec): New variable. * gnu/packages/hare-xyz.scm (hare-json): New variable. (hare-ssh): New variable. Change-Id: I3a9b3f9ca8e174b98b17319f383e63a267d64e27 --- gnu/local.mk | 3 + gnu/packages/hare-xyz.scm | 86 ++++++++++++++++++++++++++ gnu/packages/hare.scm | 127 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 216 insertions(+) create mode 100644 gnu/packages/hare-xyz.scm create mode 100644 gnu/packages/hare.scm diff --git a/gnu/local.mk b/gnu/local.mk index 8f0ff23251..286740d5fa 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -67,6 +67,7 @@ # Copyright © 2024 David Elsing # Copyright © 2024 Ashish SHUKLA # Copyright © 2024 Fabio Natali +# Copyright © 2024 Daniel [REDACTED] # # This file is part of GNU Guix. # @@ -351,6 +352,8 @@ GNU_SYSTEM_MODULES = \ %D%/packages/haskell-crypto.scm \ %D%/packages/haskell-web.scm \ %D%/packages/haskell-xyz.scm \ + %D%/packages/hare.scm \ + %D%/packages/hare-xyz.scm \ %D%/packages/haxe.scm \ %D%/packages/heads.scm \ %D%/packages/hexedit.scm \ diff --git a/gnu/packages/hare-xyz.scm b/gnu/packages/hare-xyz.scm new file mode 100644 index 0000000000..aaac6f5ead --- /dev/null +++ b/gnu/packages/hare-xyz.scm @@ -0,0 +1,86 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2024 Daniel [REDACTED] +;;; +;;; 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-xyz) + #:use-module (gnu packages) + #:use-module (gnu packages hare) + + #:use-module (guix build-system gnu) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module ((guix licenses) #:prefix l:)) + +(define-public hare-json + (package + (name "hare-json") + + ;; This most probably isn't a coincidence. ddevault versions his libraries + ;; alongside the rest of Hare. Don't ask me why! + (version %hare-toolchain-version) + + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.sr.ht/~sircmpwn/hare-json") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0sni7j4x5s727cv1x3n40q310dbljswrz55skdb9fs6vclf361cs")))) + + (build-system gnu-build-system) + (arguments + %hare-build-arguments) + + (native-inputs (list hare)) + + (synopsis "JSON support for Hare") + (description "hare-ssh is a library providing JSON support for Hare.") + (home-page "https://git.sr.ht/~sircmpwn/hare-json") + + (license l:mpl2.0))) + + +(define-public hare-ssh + (package + (name "hare-ssh") + + (version %hare-toolchain-version) + + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.sr.ht/~sircmpwn/hare-ssh") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0mnlwwi3vl2hw0v7srkh5j08hdgvfwqzbdi3yps3rjikf8rzz0cj")))) + + (build-system gnu-build-system) + (arguments + %hare-build-arguments) + + (native-inputs (list hare)) + + (synopsis "SSH library for Hare") + (description "hare-ssh is a SSH library for Hare.") + (home-page "https://git.sr.ht/~sircmpwn/hare-ssh") + + (license l:mpl2.0))) diff --git a/gnu/packages/hare.scm b/gnu/packages/hare.scm new file mode 100644 index 0000000000..b31f0c4777 --- /dev/null +++ b/gnu/packages/hare.scm @@ -0,0 +1,127 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2024 Daniel [REDACTED] +;;; +;;; 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 (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages c) + #:use-module (gnu packages commencement) + #:use-module (gnu packages man) + + #:use-module (guix build-system gnu) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (guix utils) + #:use-module ((guix licenses) #:prefix l:)) + +;;; Might want to make a hare-build-system, but this mess works well enough. +(define-public %hare-toolchain-version "0.24.2") +(define %hare-phases + `(modify-phases %standard-phases + (delete 'configure) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (invoke "make" "install"))))) + +(define %hare-common-build-arguments + `(#:make-flags (list (string-append "CC=" ,(cc-for-target)) + "XDG_CACHE_HOME=/tmp/"))) +(define-public %hare-build-arguments + (append %hare-common-build-arguments + `(#:phases (modify-phases %standard-phases + (add-before 'configure 'set-prefix + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "Makefile" (("/usr/local") out))))) + (delete 'configure) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (invoke "make" "install"))))))) +(define-public %hare-toolchain-build-arguments + (append %hare-common-build-arguments + `(#:phases (modify-phases %standard-phases + (add-before 'configure 'set-platform + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (rename-file "./configs/linux.mk" "./config.mk") + (substitute* "./config.mk" (("/usr/local") out))))) + (delete 'configure) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (invoke "make" "install"))))))) + +(define-public harec + (package + (name "harec") + (version %hare-toolchain-version) + + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.sr.ht/~sircmpwn/harec") + (commit "0.24.2"))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1alqc6ycfq8saijb4l5sv294sj2h522ffr3gnln8xzrbyrs029b0")))) + + (build-system gnu-build-system) + (arguments + %hare-toolchain-build-arguments) + + (inputs (list qbe)) + (native-inputs (list qbe gcc-toolchain)) + + (synopsis "The Hare compiler") + (description "harec is a bootstrap compiler for Hare written in C11 for +POSIX-compatible systems.") + (home-page "https://git.sr.ht/~sircmpwn/harec") + + (license l:gpl3))) + +(define-public hare + (package + (name "hare") + (version %hare-toolchain-version) + + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.sr.ht/~sircmpwn/hare") + (commit "0.24.2"))) + (file-name (git-file-name name version)) + (sha256 + (base32 "15zac3h9bi9hjmgzslw4zx1vniabxnkq7z0z5pwlry05in85qngb")))) + + (build-system gnu-build-system) + (arguments + (append %hare-toolchain-build-arguments + '(#:tests? #f))) + + (propagated-inputs (list qbe harec binutils)) + (native-inputs (list harec qbe scdoc)) + + (synopsis "The Hare compiler frontend") + (description + "Hare is a systems programming language. This is the frontend for the +harec Hare compiler.") + (home-page "https://git.sr.ht/~sircmpwn/hare") + + (license l:gpl3))) base-commit: df14cacca9b95d69fdd3b6191e42df36af266bcd -- 2.45.2