GNU bug report logs - #53456
[PATCH] gnu: Add fnlfmt.

Previous Next

Package: guix-patches;

Reported by: Brandon Lucas <br <at> ndon.dk>

Date: Sat, 22 Jan 2022 21:30:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Brandon Lucas <br <at> ndon.dk>
Subject: bug#53456: closed (Re: bug#53456: [PATCH] gnu: Add fnlfmt.)
Date: Wed, 26 Jan 2022 15:53:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#53456: [PATCH] gnu: Add fnlfmt.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 53456 <at> debbugs.gnu.org.

-- 
53456: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=53456
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Brandon Lucas <br <at> ndon.dk>
Cc: Maxime Devos <maximedevos <at> telenet.be>, 53456-done <at> debbugs.gnu.org
Subject: Re: bug#53456: [PATCH] gnu: Add fnlfmt.
Date: Wed, 26 Jan 2022 16:52:01 +0100
Hi,

Brandon Lucas <br <at> ndon.dk> skribis:

> * gnu/packages/lua.scm (fnlfmt): New variable.

[...]

> * gnu/packages/lua.scm (fennel): Update to 03c1c95.

Applied.

Since we normally don’t package snapshots, I took the liberty to add the
justification you gave as a comment in next to the commit definition.

Thank you, and thanks Maxime for the thorough review!

Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Brandon Lucas <br <at> ndon.dk>
To: guix-patches <at> gnu.org
Cc: Brandon Lucas <br <at> ndon.dk>
Subject: [PATCH] gnu: Add fnlfmt.
Date: Sat, 22 Jan 2022 21:28:56 +0000
* gnu/packages/lua.scm (fnlfmt): New variable.
---
 gnu/packages/lua.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 99f09a26f1..50f97c3912 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2020 Paul A. Patience <paul <at> apatience.com>
 ;;; Copyright © 2021 Vinícius dos Santos Oliveira <vini.ipsmaker <at> gmail.com>
 ;;; Copyright © 2021 Greg Hogan <code <at> greghogan.com>
+;;; Copyright © 2022 Brandon Lucas <br <at> ndon.dk>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1208,3 +1209,48 @@ (define-public fennel
 simplicity, and reach of Lua with the flexibility of a Lisp syntax and macro
 system.")
     (license license:expat)))
+
+(define-public fnlfmt
+  (package
+    (name "fnlfmt")
+    (version "0.2.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://git.sr.ht/~technomancy/fnlfmt")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1rv0amqhy5ypi3pvxfaadn3k1cy4mjlc49wdzl2psz3i11w9gr36"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:test-target "test"
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'build 'patch-makefile
+           ;; Use input fennel instead of bundled fennel.
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "Makefile"
+               (("./fennel") (search-input-file inputs "/bin/fennel")))))
+         (add-after 'build 'patch-fnlfmt
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "fnlfmt"
+               (("/usr/bin/env .*lua") (search-input-file inputs "/bin/lua")))))
+         (replace 'install
+           ;; There is no install target; manually install the output file.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out")) (bin (string-append out
+                                                          "/bin")))
+               (for-each (lambda (file)
+                           (install-file file bin))
+                         (find-files "." "fnlfmt"))))))))
+    (inputs (list fennel))
+    (propagated-inputs (list lua))
+    (home-page "https://git.sr.ht/~technomancy/fnlfmt")
+    (synopsis "Automatic formatting of Fennel code")
+    (description
+     "Fnlfmt is a tool for automatically formatting Fennel code in a consistent
+way, following established lisp conventions.")
+    (license license:lgpl3+)))
--
2.34.0





This bug report was last modified 3 years and 173 days ago.

Previous Next


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