[PATCH 00/12] Add elm-format.

  • Open
  • quality assurance status badge
Details
One participant
  • Distopico
Owner
unassigned
Submitted by
Distopico
Severity
normal
D
D
Distopico wrote on 24 Jul 2023 22:15
(address . guix-patches@gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230724201632.2095-1-distopico@riseup.net
Adds `elm-format` tool form Elm language and all the depdencies required to build it,

Also, this fixes various ghc packages that didn't have 'text' as an explicit dependency and
were using the internal type, which created a type conflict manifested when building elm-format,
which required a version greater than what the other packages were using.

Distopico (12):
gnu: ghc-quickcheck-instances: Update to 0.3.29.
gnu: Add ghc-generically.
gnu: Add ghc-aeson-2.1.
gnu: Add ghc-data-array-byte.
gnu: Add ghc-pooled-io.
gnu: Add ghc-text.
gnu: Add ghc-relude.
gnu: Add ghc-concurrent-split.
gnu: Add ghc-hspec-golden.
gnu: Add ghc-bimap.
gnu: Fix missing required ghc-text dependency.
gnu: Add elm-format.

gnu/packages/elm.scm | 197 +++++++++++++++++++++++++++++++++
gnu/packages/haskell-check.scm | 6 +-
gnu/packages/haskell-web.scm | 40 ++++++-
gnu/packages/haskell-xyz.scm | 177 ++++++++++++++++++++++++++++-
4 files changed, 411 insertions(+), 9 deletions(-)


base-commit: cf9904bcc8dd03e73675475bb4d8746dc434e415
--
2.41.0
D
D
Distopico wrote on 24 Jul 2023 22:23
[PATCH 01/12] gnu: ghc-quickcheck-instances: Update to 0.3.29.
(address . 64840@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230724202532.8993-1-distopico@riseup.net
* gnu/packages/haskell-check.scm (ghc-quickcheck-instances): Update to 0.3.29.
---
gnu/packages/haskell-check.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Toggle diff (38 lines)
diff --git a/gnu/packages/haskell-check.scm b/gnu/packages/haskell-check.scm
index 5447ecec1e..65c5bb460c 100644
--- a/gnu/packages/haskell-check.scm
+++ b/gnu/packages/haskell-check.scm
@@ -365,13 +365,13 @@ (define-public ghc-tasty-expected-failure
(define-public ghc-quickcheck-instances
(package
(name "ghc-quickcheck-instances")
- (version "0.3.28")
+ (version "0.3.29")
(source (origin
(method url-fetch)
(uri (hackage-uri "quickcheck-instances" version))
(sha256
(base32
- "1jycijv7gaj6qrkp219nllrdv9zd0ifp0mb0rch430fm95xin4f4"))))
+ "12pxldi6rp40cvfwdaalwr33dr7xgv6azygwbb7s143hhj19gpwb"))))
(build-system haskell-build-system)
(properties '((upstream-name . "quickcheck-instances")))
(inputs (list ghc-quickcheck
@@ -386,6 +386,7 @@ (define-public ghc-quickcheck-instances
ghc-scientific
ghc-strict
ghc-tagged
+ ghc-data-array-byte
ghc-these
ghc-time-compat
ghc-transformers-compat
@@ -868,6 +869,7 @@ (define-public ghc-hedgehog
ghc-barbies
ghc-concurrent-output
ghc-erf
+ ghc-text
ghc-lifted-async
ghc-mmorph
ghc-monad-control
--
2.41.0
D
D
Distopico wrote on 24 Jul 2023 22:23
[PATCH 02/12] gnu: Add ghc-generically.
(address . 64840@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230724202532.8993-2-distopico@riseup.net
* gnu/packages/haskell-web.scm (ghc-generically): New variable.
---
gnu/packages/haskell-web.scm | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)

Toggle diff (48 lines)
diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index 75b84b10a7..6c6122299d 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@member.fsf.org>
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2022 Alice Brenon <alice.brenon@ens-lyon.fr>
+;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1067,6 +1068,28 @@ (define-public ghc-aeson-better-errors
@url{http://harry.garrood.me/blog/aeson-better-errors/}.")
(license license:expat)))
+(define-public ghc-generically
+ (package
+ (name "ghc-generically")
+ (version "0.1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (hackage-uri "generically" version))
+ (sha256
+ (base32
+ "1ks3pi6mpma83xffplz8vmimyhvzpnhmcgvk3bvl3c64pqva9i84"))))
+ (build-system haskell-build-system)
+ (properties '((upstream-name . "generically")))
+ (arguments
+ `(#:cabal-revision ("1"
+ "0pkyhym7q9v03pplpfjg80vmpk0cbgc56panfx9vcbzadvxmx6rb")))
+ (home-page "https://hackage.haskell.org/package/generically")
+ (synopsis "Generically newtype to use with DerivingVia in Haskell")
+ (description
+ "This is a compatibility package as @code{Generically} and @code{Generically1}
+newtypes are available since base-4.17 in @code{GHC.Generics}.")
+ (license license:bsd-3)))
+
(define-public ghc-multipart
(package
(name "ghc-multipart")
@@ -2171,4 +2194,3 @@ (define-public ghc-network-run
(description
"This package provides a simple network runner library in Haskell.")
(license license:bsd-3)))
-
--
2.41.0
D
D
Distopico wrote on 24 Jul 2023 22:23
[PATCH 03/12] gnu: Add ghc-aeson-2.1.
(address . 64840@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230724202532.8993-3-distopico@riseup.net
* gnu/packages/haskell-web.scm (ghc-aeson-2.1): New variable.
---
gnu/packages/haskell-web.scm | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

Toggle diff (29 lines)
diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index 6c6122299d..967ff77eec 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -977,6 +977,22 @@ (define-public ghc-aeson
naming: in Greek mythology, Aeson was the father of Jason.)")
(license license:bsd-3)))
+(define-public ghc-aeson-2.1
+ (package
+ (inherit ghc-aeson)
+ (version "2.1.2.1")
+ (source (origin
+ (method url-fetch)
+ (uri (hackage-uri "aeson" version))
+ (sha256
+ (base32
+ "1ii26lz9czxqhck11pzhqlhfhm9zgbrhiydv4gh1w66f0fwl4h2x"))))
+ (inputs (modify-inputs (package-inputs ghc-aeson)
+ (prepend ghc-generically)))
+ (arguments
+ `(#:cabal-revision ("1"
+ "1yiib3ay9961pzs1bb09waw40qkk8w74553bwjp5gkym3dk3q3zi")))))
+
(define-public ghc-aeson-pretty
(package
(name "ghc-aeson-pretty")
--
2.41.0
D
D
Distopico wrote on 24 Jul 2023 22:23
[PATCH 04/12] gnu: Add ghc-data-array-byte.
(address . 64840@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230724202532.8993-4-distopico@riseup.net
* gnu/packages/haskell-xyz.scm (ghc-data-array-byte): New variable.
---
gnu/packages/haskell-xyz.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (43 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 71df4192dc..4be7bd970c 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; Copyright © 2023 Josselin Poiret <dev@jpoiret.xyz>
;;; Copyright © 2023 zamfofex <zamfofex@twdb.moe>
+;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2612,6 +2613,28 @@ (define-public ghc-csv
lingua franca for spreadsheets, and for certain web services.")
(license license:expat)))
+(define-public ghc-data-array-byte
+ (package
+ (name "ghc-data-array-byte")
+ (version "0.1.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (hackage-uri "data-array-byte" version))
+ (sha256
+ (base32
+ "002n0af7q08q3fmgsc5b47s1clirxy0lrqglwxzhabg0nfhfrdhv"))))
+ (build-system haskell-build-system)
+ (properties '((upstream-name . "data-array-byte")))
+ (native-inputs (list ghc-tasty ghc-tasty-quickcheck
+ ghc-quickcheck-classes-base))
+ (home-page "https://hackage.haskell.org/package/data-array-byte")
+ (synopsis "Haskell compatibility layer for Data.Array.Byte")
+ (description
+ "This package provides Haskell compatibility layer for @code{Data.Array.Byte},
+providing boxed wrappers for @code{ByteArray} and @code{MutableByteArray} and relevant
+instances for GHC < 9.4.")
+ (license license:bsd-3)))
+
(define-public ghc-data-accessor
(package
(name "ghc-data-accessor")
--
2.41.0
D
D
Distopico wrote on 24 Jul 2023 22:23
[PATCH 05/12] gnu: Add ghc-pooled-io.
(address . 64840@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230724202532.8993-5-distopico@riseup.net
* gnu/packages/haskell-xyz.scm (ghc-pooled-io): New variable.
---
gnu/packages/haskell-xyz.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 4be7bd970c..879d662da6 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -8987,6 +8987,29 @@ (define-public ghc-pipes
@end itemize")
(license license:bsd-3)))
+(define-public ghc-pooled-io
+ (package
+ (name "ghc-pooled-io")
+ (version "0.0.2.3")
+ (source (origin
+ (method url-fetch)
+ (uri (hackage-uri "pooled-io" version))
+ (sha256
+ (base32
+ "0ysgfwlppilj21sqhbcq7xbyc5hnc26mzb58y7mm9rd5piw3v7mc"))))
+ (build-system haskell-build-system)
+ (properties '((upstream-name . "pooled-io")))
+ (inputs (list ghc-utility-ht ghc-unsafe ghc-concurrent-split))
+ (home-page "https://hub.darcs.net/thielema/pooled-io")
+ (synopsis
+ "Run jobs on a limited number of threads and support data dependencies")
+ (description
+ "This package provide run computations on multiple cores that need to write
+intermediate results to disk. The functions restrict the number of simultaneously
+running jobs to a user given number or to the number of capabilities the Haskell
+program.")
+ (license license:bsd-3)))
+
(define-public ghc-pointedlist
(package
(name "ghc-pointedlist")
--
2.41.0
D
D
Distopico wrote on 24 Jul 2023 22:23
[PATCH 06/12] gnu: Add ghc-text.
(address . 64840@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230724202532.8993-6-distopico@riseup.net
* gnu/packages/haskell-xyz.scm (ghc-text): New variable.
---
gnu/packages/haskell-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 879d662da6..f25fb89950 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -12098,6 +12098,32 @@ (define-public ghc-tar-conduit
interface for extracting and creating tar files.")
(license license:expat)))
+(define-public ghc-text
+ (package
+ (name "ghc-text")
+ (version "2.0.2")
+ (source (origin
+ (method url-fetch)
+ (uri (hackage-uri "text" version))
+ (sha256
+ (base32
+ "1bggb4gq15r7z685w7c7hbm3w4n6day451ickz70d1l919jvwdf7"))))
+ (build-system haskell-build-system)
+ (properties '((upstream-name . "text")))
+ (arguments
+ ;; Disable otherwise crate a circular
+ ;; dependency with tasty
+ (list #:tests? #f))
+ (home-page "https://hackage.haskell.org/package/text")
+ (synopsis "Haskell library for immutable Unicode text type")
+ (description
+ "This package provides a library for immutable Unicode text type
+(both strict and lazy). The Text type represents Unicode character
+strings, in a time and space-efficient manner. Also provides text
+processing capabilities that are optimized for performance critical
+use, both in terms of large data quantities and high speed.")
+ (license license:bsd-2)))
+
(define-public ghc-temporary
(package
(name "ghc-temporary")
--
2.41.0
D
D
Distopico wrote on 24 Jul 2023 22:23
[PATCH 07/12] gnu: Add ghc-relude.
(address . 64840@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230724202532.8993-7-distopico@riseup.net
* gnu/packages/haskell-xyz.scm (ghc-relude): New variable.
---
gnu/packages/haskell-xyz.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index f25fb89950..837c8ade16 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -10052,6 +10052,29 @@ (define-public ghc-regex-tdfa
inspired by libtre.")
(license license:bsd-3)))
+(define-public ghc-relude
+ (package
+ (name "ghc-relude")
+ (version "1.1.0.0")
+ (source (origin
+ (method url-fetch)
+ (uri (hackage-uri "relude" version))
+ (sha256
+ (base32
+ "02dn99v2qmykj0l1qmn15k36hyxccy71b7iqavfk24zgjf5g07dm"))))
+ (build-system haskell-build-system)
+ (properties '((upstream-name . "relude")))
+ (arguments
+ (list #:tests? #f))
+ (native-inputs (list ghc-doctest ghc-glob))
+ (inputs (list ghc-text ghc-hashable ghc-unordered-containers))
+ (home-page "https://hackage.haskell.org/package/relude")
+ (synopsis "Haskell standard library alternative for prelude library")
+ (description
+ "This package provide an haskell standard library alternative for
+the default haskell prelude library.")
+ (license license:expat)))
+
(define-public ghc-repline
(package
(name "ghc-repline")
--
2.41.0
D
D
Distopico wrote on 24 Jul 2023 22:23
[PATCH 08/12] gnu: Add ghc-concurrent-split.
(address . 64840@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230724202532.8993-8-distopico@riseup.net
* gnu/packages/haskell-xyz.scm (ghc-concurrent-split): New variable.
---
gnu/packages/haskell-xyz.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 837c8ade16..34a1a32cc7 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -13345,6 +13345,26 @@ (define-public ghc-unordered-containers-bootstrap
(native-inputs '())
(properties '((hidden? #t)))))
+(define-public ghc-concurrent-split
+ (package
+ (name "ghc-concurrent-split")
+ (version "0.0.1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (hackage-uri "concurrent-split" version))
+ (sha256
+ (base32
+ "0i9gak7q3ay8g1kzq7dg0bs36bg88n7kwy3h1r6jrni7mz7jh05f"))))
+ (build-system haskell-build-system)
+ (properties '((upstream-name . "concurrent-split")))
+ (home-page "https://hub.darcs.net/thielema/concurrent-split")
+ (synopsis "MVars and Channels with distinguished input and output side")
+ (description
+ "This package provides MVars and Channels with distinguished input and
+output side around the standard concurrency communication channels that make
+the distinction clear and type safe.")
+ (license license:bsd-3)))
+
(define-public ghc-commutative-semigroups
(package
(name "ghc-commutative-semigroups")
--
2.41.0
D
D
Distopico wrote on 24 Jul 2023 22:23
[PATCH 09/12] gnu: Add ghc-hspec-golden.
(address . 64840@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230724202532.8993-9-distopico@riseup.net
* gnu/packages/haskell-xyz.scm (ghc-hspec-golden): New variable.
---
gnu/packages/haskell-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 34a1a32cc7..e3c5d525b1 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -16606,6 +16606,32 @@ (define-public ghc-newtype
such as ala'.")
(license license:bsd-3)))
+(define-public ghc-hspec-golden
+ (package
+ (name "ghc-hspec-golden")
+ (version "0.2.1.0")
+ (source (origin
+ (method url-fetch)
+ (uri (hackage-uri "hspec-golden" version))
+ (sha256
+ (base32
+ "07bfwj10n75l5zskwx4yzi86xxp5b4f692bjjkqs5b970h6gw33y"))))
+ (build-system haskell-build-system)
+ (properties '((upstream-name . "hspec-golden")))
+ (inputs (list ghc-hspec
+ ghc-hspec-core
+ ghc-silently
+ ghc-optparse-applicative
+ hspec-discover))
+ (home-page "https://hackage.haskell.org/package/hspec-golden")
+ (synopsis "Haskell golden tests for hspec")
+ (description
+ "This package provides golden tests store the expected output in a
+separated file.
+Each time a golden test is executed the output of the subject
+under test (SUT) is compared with the expected output.")
+ (license license:expat)))
+
(define-public ghc-hspec-hedgehog
(package
(name "ghc-hspec-hedgehog")
--
2.41.0
D
D
Distopico wrote on 24 Jul 2023 22:23
[PATCH 10/12] gnu: Add ghc-bimap.
(address . 64840@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230724202532.8993-10-distopico@riseup.net
* gnu/packages/haskell-xyz.scm (ghc-bimap): New variable.
---
gnu/packages/haskell-xyz.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index e3c5d525b1..337dcac4d8 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -936,6 +936,27 @@ (define-public ghc-bencode
storing and transmitting loosely structured data.")
(license license:bsd-3)))
+(define-public ghc-bimap
+ (package
+ (name "ghc-bimap")
+ (version "0.5.0")
+ (source (origin
+ (method url-fetch)
+ (uri (hackage-uri "bimap" version))
+ (sha256
+ (base32
+ "158cdwk9jwklcfgbn62dqq255i40w13ifggsdps87sxc5q7lpd5h"))))
+ (build-system haskell-build-system)
+ (properties '((upstream-name . "bimap")))
+ (native-inputs (list ghc-quickcheck))
+ (home-page "https://hackage.haskell.org/package/bimap")
+ (synopsis "Bidirectional mapping between two key types for Haskell")
+ (description
+ "This pckage provides data structure representing a bidirectional
+mapping between two key types. Each value in the bimap is associated
+with exactly one value of the opposite type.")
+ (license license:bsd-3)))
+
(define-public ghc-bifunctors
(package
(name "ghc-bifunctors")
--
2.41.0
D
D
Distopico wrote on 24 Jul 2023 22:23
[PATCH 11/12] gnu: Fix missing required ghc-text dependency.
(address . 64840@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230724202532.8993-11-distopico@riseup.net
Several package require `text` haskell library as dependency but those are
using the internal haskell type creation a mismatch of types

An example of this is

* gnu/packages/haskell-xyz.scm.
---
gnu/packages/haskell-xyz.scm | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)

Toggle diff (88 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 337dcac4d8..f1955dd1c2 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -425,7 +425,7 @@ (define-public ghc-ansi-wl-pprint
`(#:cabal-revision
("2" "1xrv66v5hqchjhj8a0g3awy1qpsswk2jqb4w4yh3mm1py5s0dlr0")))
(inputs
- (list ghc-ansi-terminal))
+ (list ghc-text ghc-ansi-terminal))
(home-page "https://github.com/ekmett/ansi-wl-pprint")
(synopsis "Wadler/Leijen Pretty Printer for colored ANSI terminal output")
(description "This is a pretty printing library based on Wadler's paper
@@ -1494,7 +1494,7 @@ (define-public ghc-cassava
@item
Customizable record-conversion instance derivation via GHC generics
@item
-Low-level @url{https://hackage.haskell.org/package/bytestring), bytestring}
+Low-level @url{https://hackage.haskell.org/package/bytestring, bytestring}
builders (see @url{https://hackage.haskell.org/package/cassava-0.5.2.0/docs/
Data-Csv-Builder.html, Data.Csv.Builder})
@item
@@ -4904,6 +4904,7 @@ (define-public ghc-hashable
(build-system haskell-build-system)
(properties '((upstream-name . "hashable")))
(native-inputs (list ghc-hunit
+ ghc-text
ghc-quickcheck
ghc-random
ghc-test-framework
@@ -8207,7 +8208,7 @@ (define-public ghc-optparse-applicative
"097p1bkvw9r3rvcr65w53yw14drb0s46ldkkl1jbmq5g7m6jwnw2"))))
(build-system haskell-build-system)
(properties '((upstream-name . "optparse-applicative")))
- (inputs (list ghc-transformers-compat ghc-ansi-wl-pprint))
+ (inputs (list ghc-text ghc-transformers-compat ghc-ansi-wl-pprint))
(native-inputs (list ghc-quickcheck))
(home-page "https://github.com/pcapriotti/optparse-applicative")
(synopsis "Utilities and combinators for parsing command line options")
@@ -9232,7 +9233,7 @@ (define-public ghc-pretty-show
(build-system haskell-build-system)
(properties '((upstream-name . "pretty-show")))
(inputs
- (list ghc-haskell-lexer ghc-happy))
+ (list ghc-text ghc-haskell-lexer ghc-happy))
(home-page "https://wiki.github.com/yav/pretty-show")
(synopsis "Tools for working with derived `Show` instances")
(description
@@ -9947,6 +9948,7 @@ (define-public ghc-regex-base
"1w9fxad1dwi040r3db9i2cjhhrl86p3hngj13ixbcnqgb27l16bv"))))
(build-system haskell-build-system)
(properties '((upstream-name . "regex-base")))
+ (inputs (list ghc-text))
(arguments
`(#:cabal-revision ("1"
"1k2gzjm7xz69f7zr08wh2wzb5dhb659cvimsvx0g9p8cf5f45x2g")))
@@ -10816,7 +10818,7 @@ (define-public ghc-semigroups
"1qbk6scp1rzb69dy8mz26p6az5vi16g2lzwmwnfshh3br4rjwbch"))))
(build-system haskell-build-system)
(properties '((upstream-name . "semigroups")))
- (inputs (list ghc-nats ghc-tagged ghc-hashable ghc-unordered-containers
+ (inputs (list ghc-text ghc-nats ghc-tagged ghc-hashable ghc-unordered-containers
ghc-transformers-compat))
(home-page "http://github.com/ekmett/semigroups/")
(synopsis "Semigroup operations for Haskell")
@@ -14053,6 +14055,7 @@ (define-public ghc-wl-pprint-annotated
"1br7qyf27iza213inwhf9bm2k6in0zbmfw6w4clqlc9f9cj2nrkb"))))
(build-system haskell-build-system)
(properties '((upstream-name . "wl-pprint-annotated")))
+ (inputs (list ghc-text))
(native-inputs
(list ghc-tasty ghc-tasty-hunit))
(home-page
@@ -14224,6 +14227,7 @@ (define-public ghc-xml
"0g814lj7vaxvib2g3r734221k80k7ap9czv9hinifn8syals3l9j"))))
(build-system haskell-build-system)
(properties '((upstream-name . "xml")))
+ (inputs (list ghc-text))
(home-page "https://github.com/GaloisInc/xml")
(synopsis "Simple XML library for Haskell")
(description "This package provides a simple XML library for Haskell.")
@@ -16909,4 +16913,3 @@ (define-public ghc-ref-tf
;;; of a merge conflict, place them above by existing packages with similar
;;; functionality or similar names.
;;;
-
--
2.41.0
D
D
Distopico wrote on 24 Jul 2023 22:23
[PATCH 12/12] gnu: Add elm-format.
(address . 64840@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230724202532.8993-12-distopico@riseup.net
* gnu/packages/elm.scm (elm-format): New variable.
---
gnu/packages/elm.scm | 197 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 197 insertions(+)

Toggle diff (217 lines)
diff --git a/gnu/packages/elm.scm b/gnu/packages/elm.scm
index a74d294ae5..5361634abb 100644
--- a/gnu/packages/elm.scm
+++ b/gnu/packages/elm.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net>
;;; Copyright © 2022 Philip McGrath <philip@philipmcgrath.com>
;;; Copyright © 2022 jgart <jgart@dismail.de>
+;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -384,6 +385,202 @@ (define-public elm-bytes
and @code{DataView}.")
(license license:bsd-3)))
+(define elm-format-avh4-lib
+ (let ((commit "b5cca4c26b473dab06e5d73b98148637e4770d45"))
+ (package
+ (name "elm-format-avh4-lib")
+ (version "0.0.0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/avh4/elm-format")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "04l1bn4w8q3ifd6mc4mfrqxfbihmqnpfjdn6gr0x2jqcasjbk0bi"))))
+ (build-system haskell-build-system)
+ (properties '((upstream-name . "avh4-lib") (hidden? #t)))
+ (arguments
+ ;; Require and use ghc-text but ghc doesn't detect it
+ `(#:configure-flags (list "--ghc-option=-Wno-error=unused-packages")
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'enter-lib-subdirectory
+ (lambda _
+ (chdir "avh4-lib"))))))
+ (inputs (list ghc-pooled-io ghc-text ghc-relude))
+ (native-inputs (list ghc-tasty ghc-tasty-hunit ghc-tasty-hspec))
+ (home-page "https://github.com/avh4/elm-format/tree/main/avh4-lib")
+ (synopsis "Common code for elm-format packages")
+ (description
+ "This packages provides common code for @command{elm-format} haskell projects.")
+ (license license:bsd-3))))
+
+(define elm-format-test-lib
+ (let ((commit "b5cca4c26b473dab06e5d73b98148637e4770d45"))
+ (package
+ (name "elm-format-test-lib")
+ (version "0.0.0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/avh4/elm-format")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "04l1bn4w8q3ifd6mc4mfrqxfbihmqnpfjdn6gr0x2jqcasjbk0bi"))))
+ (build-system haskell-build-system)
+ (properties '((upstream-name . "elm-format-test-lib") (hidden? #t)))
+ (arguments
+ `(#:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'enter-lib-subdirectory
+ (lambda _
+ (chdir "elm-format-test-lib"))))))
+ (inputs (list elm-format-avh4-lib ghc-split ghc-text))
+ (native-inputs (list ghc-hspec-golden ghc-hspec ghc-tasty-hspec
+ ghc-tasty-hunit))
+ (home-page
+ "https://github.com/avh4/elm-format/tree/main/elm-format-test-lib")
+ (synopsis "Test helpers used by elm-format")
+ (description "This package provides elf-format helpers for test used by
+@command{elm-format}, elm-format-tests and elm-refactor-tests.")
+ (license license:bsd-3))))
+
+(define elm-format-markdown
+ (let ((commit "b5cca4c26b473dab06e5d73b98148637e4770d45"))
+ (package
+ (name "elm-format-markdown")
+ (version "0.0.0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/avh4/elm-format")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "04l1bn4w8q3ifd6mc4mfrqxfbihmqnpfjdn6gr0x2jqcasjbk0bi"))))
+ (build-system haskell-build-system)
+ (properties '((upstream-name . "elm-format-markdown") (hidden? #t)))
+ (arguments
+ `(#:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'enter-lib-subdirectory
+ (lambda _
+ (chdir "elm-format-markdown"))))))
+ (inputs (list elm-format-avh4-lib ghc-split ghc-text))
+ (native-inputs (list ghc-hspec-golden ghc-tasty ghc-tasty-hunit
+ ghc-tasty-hspec))
+ (home-page
+ "https://github.com/avh4/elm-format/blob/main/elm-format-markdown")
+ (synopsis "Markdown parsing for Elm documentation comments")
+ (description "This package provides an markdown parsing for Elm
+documentation comments used by @command{elm-format}.")
+ (license license:bsd-3))))
+
+(define elm-format-lib
+ (let ((commit "b5cca4c26b473dab06e5d73b98148637e4770d45"))
+ (package
+ (name "elm-format-lib")
+ (version "0.0.0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/avh4/elm-format")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "04l1bn4w8q3ifd6mc4mfrqxfbihmqnpfjdn6gr0x2jqcasjbk0bi"))))
+ (build-system haskell-build-system)
+ (properties '((upstream-name . "elm-format-lib") (hidden? #t)))
+ (arguments
+ `(#:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'enter-lib-subdirectory
+ (lambda _
+ (chdir "elm-format-lib"))))))
+ (inputs
+ (list elm-format-avh4-lib
+ elm-format-markdown
+ ghc-optparse-applicative
+ ghc-aeson-2.1
+ ghc-bimap
+ ghc-relude
+ ghc-text))
+ (native-inputs
+ (list elm-format-test-lib
+ ghc-split
+ ghc-hspec
+ ghc-tasty
+ ghc-tasty-hspec
+ ghc-tasty-hunit))
+ (home-page "https://github.com/avh4/elm-format/blob/main/elm-format-lib")
+ (synopsis "Common code used by elm-format")
+ (description "This package provides elm-format library with common code
+used by @command{elm-format} and elm-refactor.")
+ (license license:bsd-3))))
+
+(define-public elm-format
+ (package
+ (name "elm-format")
+ (version "0.8.7")
+ (source (origin
+ (method git-fetch)
+ (file-name (git-file-name name version))
+ (uri (git-reference
+ (url "https://github.com/avh4/elm-format")
+ (commit version)))
+ (sha256
+ (base32
+ "04l1bn4w8q3ifd6mc4mfrqxfbihmqnpfjdn6gr0x2jqcasjbk0bi"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; We don't build these library in this packages.
+ (delete-file-recursively "avh4-lib")
+ (delete-file-recursively "elm-format-lib")
+ (delete-file-recursively "elm-format-test-lib")
+ (delete-file-recursively "elm-format-markdown")))))
+ (build-system haskell-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-before 'configure 'ganerate-build-file
+ (lambda _
+ ;; We need crate manually this build file
+ ;; because elm-format use `hpack`.
+ (mkdir "generated")
+ (let ((f (open-file "generated/Build_elm_format.hs" "a")))
+ (display "module Build_elm_format where\n" f)
+ (display "gitDescribe :: String\n" f)
+ (display (string-append "gitDescribe = \""
+ ,(package-version elm-format)
+ "\"") f)
+ (close-port f)))))))
+ (inputs
+ (list elm-format-avh4-lib
+ elm-format-lib
+ ghc-aeson
+ ghc-text
+ ghc-relude
+ ghc-aeson-2.1
+ ghc-ansi-wl-pprint
+ ghc-quickcheck
+ ghc-hspec))
+ (native-inputs
+ (list elm-format-test-lib ghc-tasty ghc-tasty-quickcheck
+ ghc-tasty-hunit ghc-tasty-hspec))
+ (home-page "https://github.com/avh4/elm-format")
+ (synopsis "Source code formatter for Elm programming language")
+ (description
+ "Formats @url{https://elm-lang.org/, Elm} programming language
+source code according to a standard set of rules based on the
+@url{https://elm-lang.org/docs/style-guide, official Elm Style Guide}.")
+ (license license:bsd-3)))
+
(define-public elm-file
(package
(name "elm-file")
--
2.41.0
D
D
Distopico wrote on 31 Aug 2023 19:48
Re: [PATCH 00/12] Add elm-format.
(address . 64840@debbugs.gnu.org)(address . lars@6xq.net)
87o7ingkyv.fsf@riseup.net
Hi All, Just a friendly reminder about this one, any feedback?

Best!

On 2023-07-24, Distopico <distopico@riseup.net> wrote:

Toggle quote (28 lines)
> Adds `elm-format` tool form Elm language and all the depdencies required to build it,
>
> Also, this fixes various ghc packages that didn't have 'text' as an explicit dependency and
> were using the internal type, which created a type conflict manifested when building elm-format,
> which required a version greater than what the other packages were using.
>
> Distopico (12):
> gnu: ghc-quickcheck-instances: Update to 0.3.29.
> gnu: Add ghc-generically.
> gnu: Add ghc-aeson-2.1.
> gnu: Add ghc-data-array-byte.
> gnu: Add ghc-pooled-io.
> gnu: Add ghc-text.
> gnu: Add ghc-relude.
> gnu: Add ghc-concurrent-split.
> gnu: Add ghc-hspec-golden.
> gnu: Add ghc-bimap.
> gnu: Fix missing required ghc-text dependency.
> gnu: Add elm-format.
>
> gnu/packages/elm.scm | 197 +++++++++++++++++++++++++++++++++
> gnu/packages/haskell-check.scm | 6 +-
> gnu/packages/haskell-web.scm | 40 ++++++-
> gnu/packages/haskell-xyz.scm | 177 ++++++++++++++++++++++++++++-
> 4 files changed, 411 insertions(+), 9 deletions(-)
>
>
> base-commit: cf9904bcc8dd03e73675475bb4d8746dc434e415
-----BEGIN PGP SIGNATURE-----

iQFJBAEBCAAzFiEEvYwofabWO6y953lVmAk6gHJUa/MFAmTw0tgVHGRpc3RvcGlj
b0ByaXNldXAubmV0AAoJEJgJOoByVGvznTsIAIy3KvM/U627CfFZu876U34LfpME
jbpa/TsnrMmBn8v9IPrn1fVAF7+cXDi/K7CEaSIrqlsOW5CEaz8DIu+TvUgyRNdJ
jTZ3kdy+dWePGJebLlu2/qR781njOnZNgJSP9lZBeIogv1fBbc3jasECgCFeGRdE
N6Dv2Ky6zRL4zae690JWypLTbyLkP5t3g1CugC/cFIkAlff0NM/VnCu/+3GiPGT6
zz/OuykIcI8SIzZ2TPFz3qw3vUbhw8YPtFjSD8F87hLwyiOhPH//TezDjf7ucKqe
aqhyhawQXxMlHP/xOpgBDUJ946hDaWr2EM0Jf6AbqgwRBgrV/U3qnUoz07M=
=CPzR
-----END PGP SIGNATURE-----

?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 64840@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 64840
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch