[PATCH] gnu: Add antifennel.

  • Done
  • quality assurance status badge
Details
2 participants
  • Mathieu Othacehe
  • Rémi Teissier
Owner
unassigned
Submitted by
Rémi Teissier
Severity
normal
R
R
Rémi Teissier wrote on 31 Aug 2023 16:15
(address . guix-patches@gnu.org)
e3349ef4-a55b-4318-b030-668f7ce8d44c@chillpc.fr
From c546257438e4e824ddf54351b77a754d2f466567 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Teissier?= <rteissier.code@chillpc.fr>
Date: Thu, 31 Aug 2023 15:17:28 +0200
Subject: [PATCH] gnu: Add antifennel.

---
 gnu/packages/lua.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

Toggle diff (44 lines)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 405f8511cb..9f80b2017c 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -1226,6 +1226,37 @@ (define-public fennel
 system.")
     (license license:expat)))

+(define-public antifennel
+  (package
+    (version "0.2.0")
+    (name "antifennel")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://git.sr.ht/~technomancy/antifennel")
+                    (commit version)))
+              (sha256
+               (base32
+ "1hd9h17q31b3gg88c657zq4han4air2ag55rrakbmcpy6n8acsqc"))
+              (file-name (git-file-name name version))))
+    (build-system gnu-build-system)
+    (inputs (list lua luajit))
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (delete 'check)
+                  (replace 'install
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((bin (string-append (assoc-ref outputs "out")
+                                                "/bin")))
+                        (install-file "antifennel" bin)))))))
+    (home-page "https://git.sr.ht/~technomancy/antifennel")
+    (synopsis "Turn Lua code into Fennel code")
+    (description
+     "Turn Lua code into Fennel code. This compiler does the opposite
+     of what the Fennel compiler does.")
+    (license (list license:expat))))
+
 (define-public fnlfmt
   (package
     (name "fnlfmt")
--
2.40.1
M
M
Mathieu Othacehe wrote on 26 Oct 2023 15:04
(name . Rémi Teissier)(address . rteissier.code@chillpc.fr)(address . 65662@debbugs.gnu.org)
87jzr9k01a.fsf@gnu.org
Hello,
Sorry for the delay!
Toggle quote (5 lines)
> From c546257438e4e824ddf54351b77a754d2f466567 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?R=C3=A9mi=20Teissier?= <rteissier.code@chillpc.fr>
> Date: Thu, 31 Aug 2023 15:17:28 +0200
> Subject: [PATCH] gnu: Add antifennel.
>
You are missing a commit message here. It should look like:
* gnu/packages/lua.scm (antifennel): New package.
Toggle quote (2 lines)
> +               (base32
> + "1hd9h17q31b3gg88c657zq4han4air2ag55rrakbmcpy6n8acsqc"))
The indentation seems off here.
Toggle quote (7 lines)
> +              (file-name (git-file-name name version))))
> +    (build-system gnu-build-system)
> +    (inputs (list lua luajit))
> +    (arguments
> +     '(#:phases (modify-phases %standard-phases
> +                  (delete 'configure)
> +                  (delete 'check)
Are tests disabled because there are no tests or because there are not
passing. If we are in the first case you can specify it with a simple
comment such as ;no tests.
Toggle quote (4 lines)
> +                  (replace 'install
> +                    (lambda* (#:key outputs #:allow-other-keys)
> +                      (let ((bin (string-append (assoc-ref outputs "out")
> +                                                "/bin")))
The preferred way now is to use gexp, meaning that you can directly
write:
(install-file "antifennel" #$output)
Toggle quote (5 lines)
> +    (synopsis "Turn Lua code into Fennel code")
> +    (description
> +     "Turn Lua code into Fennel code. This compiler does the opposite
> +     of what the Fennel compiler does.")
It would be nice to expand a bit the description and use sentences, such
as: This package provides a way to turn Lua code into Fennel code by...
Toggle quote (1 lines)
> +    (license (list license:expat))))
You don't need a list if there is just one license :)
Could you please send an updated patch?
Don't hesitate if you need some guidance!
Mathieu
R
R
Rémi Teissier wrote on 1 Nov 2023 15:54
[PATCH v1] gnu: Add antifennel.
(address . 65662@debbugs.gnu.org)
fd5766c1ccce4ce84f03cf9a9d3f3a4100789468.1698850457.git.rteissier.code@chillpc.fr
Change-Id: Ic1f3fbc4d73ebc30291f4b60e7e8d16942c6627d
---
gnu/packages/lua.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (48 lines)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 65cab6511c..1cde6bd66c 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -1269,6 +1269,39 @@ (define-public fennel
system.")
(license license:expat)))
+(define-public antifennel
+ (package
+ (version "0.2.0")
+ (name "antifennel")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.sr.ht/~technomancy/antifennel")
+ (commit version)))
+ (sha256
+ (base32 "1hd9h17q31b3gg88c657zq4han4air2ag55rrakbmcpy6n8acsqc"))
+ (file-name (git-file-name name version))))
+ (build-system gnu-build-system)
+ (inputs (list luajit))
+ (arguments
+ (list
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure)
+ ;; Tests pass after the fix introduced by the commit
+ ;; ecd2169fcad1fa6616fdf6e6a8569f5b866601e5
+ (delete 'check)
+ (replace 'install
+ (lambda _
+ (install-file "antifennel"
+ (string-append #$output "/bin")))))))
+ (home-page "https://git.sr.ht/~technomancy/antifennel")
+ (synopsis "Turn Lua code into Fennel code")
+ (description
+ "This package provides a way to turn Lua code into Fennel code.
+This compiler does the opposite of what the Fennel compiler does.")
+ (license license:expat)))
+
(define-public fnlfmt
(package
(name "fnlfmt")

base-commit: 26565f1bc8548011bc0e1b821a9a957db1bc2d8f
--
2.41.0
R
R
Rémi Teissier wrote on 1 Nov 2023 16:09
Re: [bug#65662] [PATCH] gnu: Add antifennel.
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 65662@debbugs.gnu.org)
12c35236-1f37-41ad-b17a-b5e5d6ceb9e0@chillpc.fr
Hello !
Sorry for the delay (too). Writing guix packages and the git email flow
is pretty new to me ^^'

I did my best to fix my patch.
Toggle quote (11 lines)
>> +              (file-name (git-file-name name version))))
>> +    (build-system gnu-build-system)
>> +    (inputs (list lua luajit))
>> +    (arguments
>> +     '(#:phases (modify-phases %standard-phases
>> +                  (delete 'configure)
>> +                  (delete 'check)
> Are tests disabled because there are no tests or because there are not
> passing. If we are in the first case you can specify it with a simple
> comment such as ;no tests.

Tests are pretty messy in this project, they work on the `main` branch
but not in the `2.0.0`. I don't really know what to add about it in comment.

Toggle quote (8 lines)
>> +                  (replace 'install
>> +                    (lambda* (#:key outputs #:allow-other-keys)
>> +                      (let ((bin (string-append (assoc-ref outputs "out")
>> +                                                "/bin")))
> The preferred way now is to use gexp, meaning that you can directly
> write:
>
> (install-file "antifennel" #$output)
Let me know if I did it right, I tried to adapt grepped example in the
project.

I kinda rushed it at my first try. I hope it is good enough now :)

Rémi Teissier

Le 26/10/2023 à 15:04, Mathieu Othacehe a écrit :
Toggle quote (53 lines)
> Hello,
>
> Sorry for the delay!
>
>> From c546257438e4e824ddf54351b77a754d2f466567 Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?R=C3=A9mi=20Teissier?=<rteissier.code@chillpc.fr>
>> Date: Thu, 31 Aug 2023 15:17:28 +0200
>> Subject: [PATCH] gnu: Add antifennel.
>>
> You are missing a commit message here. It should look like:
>
> * gnu/packages/lua.scm (antifennel): New package.
>
>> +               (base32
>> + "1hd9h17q31b3gg88c657zq4han4air2ag55rrakbmcpy6n8acsqc"))
> The indentation seems off here.
>
>> +              (file-name (git-file-name name version))))
>> +    (build-system gnu-build-system)
>> +    (inputs (list lua luajit))
>> +    (arguments
>> +     '(#:phases (modify-phases %standard-phases
>> +                  (delete 'configure)
>> +                  (delete 'check)
> Are tests disabled because there are no tests or because there are not
> passing. If we are in the first case you can specify it with a simple
> comment such as ;no tests.
>
>> +                  (replace 'install
>> +                    (lambda* (#:key outputs #:allow-other-keys)
>> +                      (let ((bin (string-append (assoc-ref outputs "out")
>> +                                                "/bin")))
> The preferred way now is to use gexp, meaning that you can directly
> write:
>
> (install-file "antifennel" #$output)
>
>> +    (home-page"https://git.sr.ht/~technomancy/antifennel")
>> +    (synopsis "Turn Lua code into Fennel code")
>> +    (description
>> +     "Turn Lua code into Fennel code. This compiler does the opposite
>> +     of what the Fennel compiler does.")
> It would be nice to expand a bit the description and use sentences, such
> as: This package provides a way to turn Lua code into Fennel code by...
>
>> +    (license (list license:expat))))
> You don't need a list if there is just one license :)
>
> Could you please send an updated patch?
>
> Don't hesitate if you need some guidance!
>
> Mathieu
Attachment: file
M
M
Mathieu Othacehe wrote on 24 Nov 2023 18:13
(name . Rémi Teissier)(address . rteissier.code@chillpc.fr)(address . 65662-done@debbugs.gnu.org)
87ttpboz1c.fsf@gnu.org
Hello,

Toggle quote (4 lines)
> Let me know if I did it right, I tried to adapt grepped example in the project.
>
> I kinda rushed it at my first try. I hope it is good enough now :)

That's perfect, thanks for your patience.

Applied,

Mathieu
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 65662@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 65662
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch