diff mbox series

[bug#64891] gnu: Add hare

Message ID HOfirAp-1D2_parMzFA7FQ-hj_C_taeFQAowyT9otBA3mzPGBzzqmiw-S-pgHCDm1EAATMCDSwd3RBZheiTh-axIj_Mxn8rFgHIEwZIFupE=@elenq.tech
State New
Headers show
Series [bug#64891] gnu: Add hare | expand

Commit Message

Ekaitz Zarraga Aug. 8, 2023, 10:09 a.m. UTC
Hi,

I applied most of the proposed changes to the hare package, and I split the commit in two.

I talked with the devs and we need to propagate at least those variables because the config.mk file is not persisting the values. We'll patch that upstream later.

Best,
Ekaitz

Comments

\( Aug. 8, 2023, 10:43 a.m. UTC | #1
Ekaitz Zarraga <ekaitz@elenq.tech> writes:
> Hi,
>
> I applied most of the proposed changes to the hare package, and I split the commit in two.

Looks good :)  It's easier to read and apply the patches if you send
them with 'git send-email' as described by the manual, though:

  https://guix.gnu.org/manual/devel/en/html_node/Sending-a-Patch-Series.html

> I talked with the devs and we need to propagate at least those variables because
> the config.mk file is not persisting the values. We'll patch that upstream
> later.

You can still do something like this, surely?

  (substitute* "foo/bar.ha"
    (("\"harec\") (search-input-file inputs "/bin/harec"))
    (("\"qbe\") (search-input-file inputs "/bin/qbe")))

  -- (
Ekaitz Zarraga Aug. 8, 2023, 10:51 a.m. UTC | #2
Hi,


> Looks good :) It's easier to read and apply the patches if you send
> them with 'git send-email' as described by the manual, though:
> 
> https://guix.gnu.org/manual/devel/en/html_node/Sending-a-Patch-Series.html

My email provider doesn't help with that at all. I'm sorry... I have to do something about it.

> > I talked with the devs and we need to propagate at least those variables because
> > the config.mk file is not persisting the values. We'll patch that upstream
> > later.
> 
> 
> You can still do something like this, surely?
> 
> (substitute* "foo/bar.ha"
> (("\"harec\") (search-input-file inputs "/bin/harec"))
> (("\"qbe\") (search-input-file inputs "/bin/qbe")))
> 
> -- (

Let me take a look into this and give it a try.
Thanks for the help!
Ekaitz Zarraga Oct. 3, 2024, 9:58 p.m. UTC | #3
Close in favor of #72926
diff mbox series

Patch

From f247e52e2190fbb319cf50184a22f605a043dede Mon Sep 17 00:00:00 2001
Message-ID: <f247e52e2190fbb319cf50184a22f605a043dede.1691486188.git.ekaitz@elenq.tech>
In-Reply-To: <110a6af0295bbfc148577ce655428ffebbcb9327.1691486188.git.ekaitz@elenq.tech>
References: <110a6af0295bbfc148577ce655428ffebbcb9327.1691486188.git.ekaitz@elenq.tech>
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Tue, 8 Aug 2023 01:42:57 +0200
Subject: [PATCH 2/2] gnu: Add hare

* gnu/packages/hare.scm (hare): New variable
---
 gnu/packages/hare.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/hare.scm b/gnu/packages/hare.scm
index da5820510a..a73126096b 100644
--- a/gnu/packages/hare.scm
+++ b/gnu/packages/hare.scm
@@ -65,3 +65,44 @@  (define-public harec
 If you want to code in Hare, @code{hare} package is recommended.")
       (home-page "https://git.sr.ht/~sircmpwn/harec")
       (license license:gpl3))))
+
+
+(define-public hare
+  (let ((revision "1")
+        (commit "0919412be13703235c7deabdb6216254e4a39432"))
+    (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 commit)))
+          (file-name (git-file-name name version))
+          (sha256
+           (base32 "042dxdcnk9fwgcfkd1iac8q944qsq6qb1c8v1s12ixybc3nmnnva"))))
+      (native-inputs (list scdoc))
+      (propagated-inputs (list qbe harec))
+      (build-system gnu-build-system)
+      (arguments
+        (list
+          #:make-flags
+          #~(list "HARECACHE=./cache"
+                  (string-append "PREFIX=" #$output))
+          #:phases
+          #~(modify-phases %standard-phases
+              (replace 'configure
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (rename-file "config.example.mk" "config.mk"))))))
+      (native-search-paths
+        (list (search-path-specification
+                (variable "HAREPATH")
+                (files (list "src/hare/stdlib" "src/hare/third-party")))))
+      (synopsis "Systems programming language")
+      (description "Hare is a systems programming language designed to be
+simple, stable, and robust.  It uses a static type system, manual memory
+management, and a minimal runtime.  This package provides the compiler, the
+compiler driver and the standard library.")
+      (home-page "https://git.sr.ht/~sircmpwn/hare")
+      (license license:gpl3))))
-- 
2.41.0