GNU bug report logs - #72926
[PATCH] gnu: Add Hare toolchain and ecostuff.

Previous Next

Package: guix-patches;

Reported by: "Daniel [REDACTED]" <pjals <at> privacyrequired.com>

Date: Sun, 1 Sep 2024 11:30:02 UTC

Severity: normal

Tags: patch

Done: "jgart" <jgart <at> dismail.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 72926 in the body.
You can then email your comments to 72926 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#72926; Package guix-patches. (Sun, 01 Sep 2024 11:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Daniel [REDACTED]" <pjals <at> privacyrequired.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 01 Sep 2024 11:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Daniel [REDACTED]" <pjals <at> privacyrequired.com>
To: guix-patches <at> gnu.org
Cc: "Daniel \[REDACTED\]" <pjals <at> privacyrequired.com>
Subject: [PATCH] gnu: Add Hare toolchain and ecostuff.
Date: Sun,  1 Sep 2024 14:13:58 +0300
* 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 <david.elsing <at> posteo.net>
 # Copyright © 2024 Ashish SHUKLA <ashish.is <at> lostca.se>
 # Copyright © 2024 Fabio Natali <me <at> fabionatali.com>
+# Copyright © 2024 Daniel [REDACTED] <pjals <at> privacyrequired.com>
 #
 # 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] <pjals <at> privacyrequired.com>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(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] <pjals <at> privacyrequired.com>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(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





Information forwarded to guix-patches <at> gnu.org:
bug#72926; Package guix-patches. (Sun, 01 Sep 2024 21:48:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Daniel [REDACTED]" <pjals <at> privacyrequired.com>
To: guix-patches <at> gnu.org
Cc: "Daniel \[REDACTED\]" <pjals <at> privacyrequired.com>
Subject: [PATCH] gnu: Fix Hare license.
Date: Sun,  1 Sep 2024 17:44:27 +0300
* gnu/packages/hare.scm (hare): Fix license.

Change-Id: Icd3a21909588faf5e29386e652c5757009bbbf62
---
 gnu/packages/hare.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/hare.scm b/gnu/packages/hare.scm
index b31f0c4777..baecd7ca6b 100644
--- a/gnu/packages/hare.scm
+++ b/gnu/packages/hare.scm
@@ -124,4 +124,5 @@ (define-public hare
 harec Hare compiler.")
     (home-page "https://git.sr.ht/~sircmpwn/hare")
 
-    (license l:gpl3)))
+    (license (list l:mpl2.0   ; stdlib
+                   l:gpl3)))) ; everything else

base-commit: df14cacca9b95d69fdd3b6191e42df36af266bcd
prerequisite-patch-id: 4d650567dcfdf4ddb01b3f57da37ef05af8f15d6
-- 
2.45.2





Information forwarded to guix-patches <at> gnu.org:
bug#72926; Package guix-patches. (Sat, 23 Nov 2024 16:49:02 GMT) Full text and rfc822 format available.

Message #11 received at 72926 <at> debbugs.gnu.org (full text, mbox):

From: "jgart" <jgart <at> dismail.de>
To: 72926 <at> debbugs.gnu.org, pjals <at> privacyrequired.com
Subject: Re: [PATCH 2/2] gnu: Add hare.
Date: Sat, 23 Nov 2024 16:48:08 +0000
Hi Daniel,

I saw that you listed these patches as being redacted.

Could you give the Guix reviewers some more information and context around that?

Thanks,

jgart




Reply sent to "jgart" <jgart <at> dismail.de>:
You have taken responsibility. (Sat, 04 Jan 2025 01:00:02 GMT) Full text and rfc822 format available.

Notification sent to "Daniel [REDACTED]" <pjals <at> privacyrequired.com>:
bug acknowledged by developer. (Sat, 04 Jan 2025 01:00:03 GMT) Full text and rfc822 format available.

Message #16 received at 72926-done <at> debbugs.gnu.org (full text, mbox):

From: "jgart" <jgart <at> dismail.de>
To: 72926-done <at> debbugs.gnu.org
Date: Sat, 04 Jan 2025 00:58:44 +0000
Hi,

Closing since redacted. Feel free to reopen if interested in working more on hare.

all best,

jgart




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 01 Feb 2025 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 139 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.