GNU bug report logs - #46392
[PATCH] gnu: Add nixfmt.

Previous Next

Package: guix-patches;

Reported by: EuAndreh <eu <at> euandre.org>

Date: Tue, 9 Feb 2021 01:16:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46392 in the body.
You can then email your comments to 46392 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#46392; Package guix-patches. (Tue, 09 Feb 2021 01:16:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to EuAndreh <eu <at> euandre.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 09 Feb 2021 01:16:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: EuAndreh <eu <at> euandre.org>
To: guix-patches <at> gnu.org
Cc: EuAndreh <eu <at> euandre.org>
Subject: [PATCH] gnu: Add nixfmt.
Date: Mon,  8 Feb 2021 22:14:52 -0300
* 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 <at> member.fsf.org>
 ;;; Copyright © 2020 Carlo Holl <carloholl <at> gmail.com>
 ;;; Copyright © 2020 Christopher Lemmer Webber <cwebber <at> dustycloud.org>
+;;; Copyright © 2021 EuAndreh <eu <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#46392; Package guix-patches. (Sun, 21 Feb 2021 00:51:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: EuAndreh via Guix-patches via <guix-patches <at> gnu.org>
Cc: 46392-done <at> debbugs.gnu.org, EuAndreh <eu <at> euandre.org>
Subject: Re: [bug#46392] [PATCH] gnu: Add nixfmt.
Date: Sun, 21 Feb 2021 01:50:31 +0100
Hello,

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

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

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

Regards,
-- 
Nicolas Goaziou




Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Sun, 21 Feb 2021 00:51:02 GMT) Full text and rfc822 format available.

Notification sent to EuAndreh <eu <at> euandre.org>:
bug acknowledged by developer. (Sun, 21 Feb 2021 00:51:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#46392; Package guix-patches. (Sun, 21 Feb 2021 03:35:01 GMT) Full text and rfc822 format available.

Message #16 received at submit <at> debbugs.gnu.org (full text, mbox):

From: EuAndreh <eu <at> euandre.org>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>, EuAndreh via Guix-patches via
 <guix-patches <at> gnu.org>
Cc: , 46392-done <at> debbugs.gnu.org
Subject: Re: [bug#46392] [PATCH] gnu: Add nixfmt.
Date: Sun, 21 Feb 2021 00:33:52 -0300
Nicolas Goaziou <mail <at> 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.




Information forwarded to guix-patches <at> gnu.org:
bug#46392; Package guix-patches. (Sun, 21 Feb 2021 03:35:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#46392; Package guix-patches. (Sun, 21 Feb 2021 09:33:01 GMT) Full text and rfc822 format available.

Message #22 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: EuAndreh <eu <at> euandre.org>
Cc: 46392-done <at> debbugs.gnu.org,
 EuAndreh via Guix-patches via <guix-patches <at> gnu.org>
Subject: Re: [bug#46392] [PATCH] gnu: Add nixfmt.
Date: Sun, 21 Feb 2021 10:31:56 +0100
Hello,

EuAndreh <eu <at> 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




Information forwarded to guix-patches <at> gnu.org:
bug#46392; Package guix-patches. (Sun, 21 Feb 2021 09:33:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#46392; Package guix-patches. (Sun, 21 Feb 2021 21:07:01 GMT) Full text and rfc822 format available.

Message #28 received at submit <at> debbugs.gnu.org (full text, mbox):

From: EuAndreh <eu <at> euandre.org>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: , 46392-done <at> debbugs.gnu.org,
 EuAndreh via Guix-patches via <guix-patches <at> gnu.org>
Subject: Re: [bug#46392] [PATCH] gnu: Add nixfmt.
Date: Sun, 21 Feb 2021 18:05:48 -0300
> WDYT?

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




Information forwarded to guix-patches <at> gnu.org:
bug#46392; Package guix-patches. (Sun, 21 Feb 2021 21:07:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 22 Mar 2021 11:24:07 GMT) Full text and rfc822 format available.

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

Previous Next


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