unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: EuAndreh via Guix-patches via <guix-patches@gnu.org>
To: 46392@debbugs.gnu.org
Cc: EuAndreh <eu@euandre.org>
Subject: [bug#46392] [PATCH] gnu: Add nixfmt.
Date: Mon,  8 Feb 2021 22:14:52 -0300	[thread overview]
Message-ID: <20210209011452.6841-1-eu@euandre.org> (raw)

* gnu/packages/haskell-xyz.scm (nixfmt): New variable.
---
A quick note: the Hackage importer worked suprisingly well. It was even
able to properly define the synopsis and description fields!

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

diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index d6c50ade71..aff3303cb3 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -28,6 +28,7 @@
 ;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@member.fsf.org>
 ;;; Copyright © 2020 Carlo Holl <carloholl@gmail.com>
 ;;; Copyright © 2020 Christopher Lemmer Webber <cwebber@dustycloud.org>
+;;; Copyright © 2021 EuAndreh <eu@euandre.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -8693,6 +8694,36 @@ making this package a full replacement for the original newtype package,
 and an alternative to newtype-th.")
     (license license:bsd-3)))
 
+(define-public nixfmt
+  (package
+    (name "nixfmt")
+    (version "0.4.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "https://hackage.haskell.org/package/nixfmt/nixfmt-"
+               version
+               ".tar.gz"))
+        (sha256
+          (base32
+            "1ispgl8rc2scr6v8bb6sks7px856jf61x74zj2iyddrn5qamkb3n"))))
+    (build-system haskell-build-system)
+    (inputs
+      `(("ghc-megaparsec" ,ghc-megaparsec)
+        ("ghc-parser-combinators" ,ghc-parser-combinators)
+        ("ghc-cmdargs" ,ghc-cmdargs)
+        ("ghc-safe-exceptions" ,ghc-safe-exceptions)))
+    (arguments
+      `(#:cabal-revision
+        ("1" "1hsj0jh6siph3afd9c2wii09sffl48rzqv653n4clpd8qy0rn48d")))
+    (home-page "https://github.com/serokell/nixfmt")
+    (synopsis "An opinionated formatter for Nix")
+    (description
+      "A formatter for Nix that ensures consistent and clear formatting
+by forgetting all existing formatting during parsing.")
+    (license license:mpl2.0)))
+
 (define-public ghc-non-negative
   (package
     (name "ghc-non-negative")
-- 
2.30.0





             reply	other threads:[~2021-02-09  1:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09  1:14 EuAndreh via Guix-patches via [this message]
2021-02-21  0:50 ` [bug#46392] [PATCH] gnu: Add nixfmt Nicolas Goaziou
2021-02-21  3:33   ` EuAndreh via Guix-patches via
2021-02-21  9:31     ` Nicolas Goaziou
2021-02-21 21:05       ` EuAndreh via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210209011452.6841-1-eu@euandre.org \
    --to=guix-patches@gnu.org \
    --cc=46392@debbugs.gnu.org \
    --cc=eu@euandre.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).