unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / Atom feed
* [bug#46392] [PATCH] gnu: Add nixfmt.
@ 2021-02-09  1:14 EuAndreh via Guix-patches via
  2021-02-21  0:50 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: EuAndreh via Guix-patches via @ 2021-02-09  1:14 UTC (permalink / raw)
  To: 46392; +Cc: EuAndreh

* 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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#46392] [PATCH] gnu: Add nixfmt.
  2021-02-09  1:14 [bug#46392] [PATCH] gnu: Add nixfmt EuAndreh via Guix-patches via
@ 2021-02-21  0:50 ` Nicolas Goaziou
  2021-02-21  3:33   ` EuAndreh via Guix-patches via
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2021-02-21  0:50 UTC (permalink / raw)
  To: 46392; +Cc: 46392-done, EuAndreh

Hello,

EuAndreh via Guix-patches via <guix-patches@gnu.org> writes:

> * gnu/packages/haskell-xyz.scm (nixfmt): New variable.

I renamed it ghc-nixfmt and pushed. Thank you.

Regards,
-- 
Nicolas Goaziou




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#46392] [PATCH] gnu: Add nixfmt.
  2021-02-21  0:50 ` Nicolas Goaziou
@ 2021-02-21  3:33   ` EuAndreh via Guix-patches via
  2021-02-21  9:31     ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: EuAndreh via Guix-patches via @ 2021-02-21  3:33 UTC (permalink / raw)
  To: mail, 46392; +Cc: , 46392-done

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> I renamed it ghc-nixfmt and pushed. Thank you.

Thanks.

Quick question: why rename it to ghc-nixfmt?

I chose to not add the "ghc-" prefix because this wasn't primarily a
library available for the Haskell ecosystem, but a standalone program
that happens to be written in Haskell.  Could you give me some tip on
the naming covention on this case?

I'm just wondering so that I can pick better names next time.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#46392] [PATCH] gnu: Add nixfmt.
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2021-02-21  9:31 UTC (permalink / raw)
  To: EuAndreh; +Cc: 46392-done, 46392

Hello,

EuAndreh <eu@euandre.org> writes:

> Quick question: why rename it to ghc-nixfmt?
>
> I chose to not add the "ghc-" prefix because this wasn't primarily a
> library available for the Haskell ecosystem, but a standalone program
> that happens to be written in Haskell.  Could you give me some tip on
> the naming covention on this case?

Good question. I prefixed it with "ghc-" because you put it in
haskell-xyz.scm, where the prefix is usual. If this is a standalone
program, it could go in haskell-apps.scm, with its prefix removed.

I don't think that warrants a deprecation warning since the package is
very young.

WDYT?

Regards,
-- 
Nicolas Goaziou




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#46392] [PATCH] gnu: Add nixfmt.
  2021-02-21  9:31     ` Nicolas Goaziou
@ 2021-02-21 21:05       ` EuAndreh via Guix-patches via
  0 siblings, 0 replies; 5+ messages in thread
From: EuAndreh via Guix-patches via @ 2021-02-21 21:05 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 46392-done, 46392


> WDYT?

Agreed.  Should I send a patch or you'll do the change?




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-21 21:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09  1:14 [bug#46392] [PATCH] gnu: Add nixfmt EuAndreh via Guix-patches via
2021-02-21  0:50 ` 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

unofficial mirror of guix-patches@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-patches/1 guix-patches/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-patches guix-patches/ https://yhetil.org/guix-patches \
		guix-patches@gnu.org
	public-inbox-index guix-patches

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.patches


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git