From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UIyPAop37GHt9wAAgWs5BA (envelope-from ) for ; Sat, 22 Jan 2022 22:30:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id IM1oO4l37GHbZQAA9RJhRA (envelope-from ) for ; Sat, 22 Jan 2022 22:30:49 +0100 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 C33283E5E8 for ; Sat, 22 Jan 2022 22:30:49 +0100 (CET) Received: from localhost ([::1]:59488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nBNyA-00030D-Tu for larch@yhetil.org; Sat, 22 Jan 2022 16:30:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBNxT-0002zx-3Q for guix-patches@gnu.org; Sat, 22 Jan 2022 16:30:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45181) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nBNxS-0001uh-QM for guix-patches@gnu.org; Sat, 22 Jan 2022 16:30:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nBNxS-0007LX-Lt for guix-patches@gnu.org; Sat, 22 Jan 2022 16:30:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53456] [PATCH] gnu: Add fnlfmt. Resent-From: Brandon Lucas Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Jan 2022 21:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53456 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53456@debbugs.gnu.org Cc: Brandon Lucas X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164288695128151 (code B ref -1); Sat, 22 Jan 2022 21:30:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Jan 2022 21:29:11 +0000 Received: from localhost ([127.0.0.1]:38084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBNwd-0007Jy-76 for submit@debbugs.gnu.org; Sat, 22 Jan 2022 16:29:11 -0500 Received: from lists.gnu.org ([209.51.188.17]:60798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBNwb-0007Jr-PM for submit@debbugs.gnu.org; Sat, 22 Jan 2022 16:29:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBNwb-0002RX-KZ for guix-patches@gnu.org; Sat, 22 Jan 2022 16:29:09 -0500 Received: from mail-4317.proton.ch ([185.70.43.17]:14572) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBNwY-0001ok-Er for guix-patches@gnu.org; Sat, 22 Jan 2022 16:29:09 -0500 Date: Sat, 22 Jan 2022 21:28:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndon.dk; s=protonmail; t=1642886941; bh=SXyc/PzCc/xRjq1e6HMKGNsbCvFOwWru0NTefSw5PM8=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:From:To:Cc; b=VQ9izC04W19AVFhv9n/pa8e6bjgCrO3kV4rv8Z/IpoHk/vqkMTj4w6ccJ/FRhq08i LW/LoMv3DY9PL8z783jlSsxNkJRIhUVAg1Ghmo2/VCuK+HbrM3PJOgDdMryJgnJoU4 G4vl+mAALXGRwVn3gQ6H04DQG2pk3X2DWYawmJF2dqDVZMeUIYQ8Ctupeic8FHfDAn nphs+Qc3ISE7tGs+WW2PD83h6nS8tGCK0KMKujegU4wQj9rU7Rg/eyr+0NTghbgDmN mNxSqLu8DxjRN/TXbCl45wEvjnBm3Yg4BzSmi16rQY7GWeSAYQVJ3jkB7fyLCHCfs5 kHFh64VHMeSTQ== From: Brandon Lucas Message-ID: <20220122212723.396566-1-br@ndon.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.43.17; envelope-from=br@ndon.dk; helo=mail-4317.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Brandon Lucas Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642887049; 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=SXyc/PzCc/xRjq1e6HMKGNsbCvFOwWru0NTefSw5PM8=; b=gOfWPWxfxW59rfbmtthiEZhMRp0V/37Fb6mw4HhqUxjo00DyKNRcJOwnj1MtFsY6yUCh9m rrBlnz4W5C8YhSm6BuxtaU4chT80W+bQJ4zs5yO08nW50p3JV9uhsoC4pBEJXpTdbiLjnu LBSa/dR8E1BnnUg2PvuiBu7YFlsYSTv5okdbYjDmIRmdKlDRCKI/ukag0hsZ+KGukxRhZ2 d4uWpOzWDzOUcEzhi3JEmrgGuDcUqMwP0btzXpAwdB5D69rgxq1U+55YEn+X4khgcBv2U3 thYYftimmBZPH3ZbK1IbxDROX4VnAlDF6W0uIG+S3iQMkAivz+Zdz8pcQFQx1Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642887049; a=rsa-sha256; cv=none; b=GPNTgFMDFqksluf9DEDYD81pA0xJECw3MnRXj0Bh23G8OiAW+ldOSV+uoW5gQYbmr+kZne 8b2W00mgsAamDQRNmwS3fyzeR+ThhIt4L1W9fNd/uKpN2hg3Qw1w06vbHgrn2U3tZSYx8k 2PnmZ7F9txYztRJ21v+AkP/3ydfp5a/DTBAxIamPXIrkDLK8PlpwqCRVh8UhpqIaDiMs6m xK8DqeR1mGBIJeK31HPOORqTgCSIUELZvcEkULg/ipSaTbr5SS/ytFAz8l3tpdyWH76ucK oC67GEqRsk1Nd6Y1t16EqZ4Aikq+0TUqS7YQABqazkAE8JMDBc9rn3Tu5aV1wQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ndon.dk header.s=protonmail header.b=VQ9izC04; dmarc=fail reason="SPF not aligned (relaxed)" header.from=ndon.dk (policy=none); 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" X-Migadu-Spam-Score: -2.23 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ndon.dk header.s=protonmail header.b=VQ9izC04; dmarc=fail reason="SPF not aligned (relaxed)" header.from=ndon.dk (policy=none); 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" X-Migadu-Queue-Id: C33283E5E8 X-Spam-Score: -2.23 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0GPor1tlLBxl * 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 =C2=A9 2020 Paul A. Patience ;;; Copyright =C2=A9 2021 Vin=C3=ADcius dos Santos Oliveira ;;; Copyright =C2=A9 2021 Greg Hogan +;;; Copyright =C2=A9 2022 Brandon Lucas ;;; ;;; 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 mac= ro 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 ou= t + "/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 consi= stent +way, following established lisp conventions.") + (license license:lgpl3+))) -- 2.34.0