diff mbox series

bug#36665: [PATCH] gnu: Add elm-compiler 0.19.0

Message ID 87blwnev0k.fsf@gnu.org
State Accepted
Headers show
Series bug#36665: [PATCH] gnu: Add elm-compiler 0.19.0 | expand

Commit Message

Ludovic Courtès Aug. 17, 2019, 2:17 p.m. UTC
Hello,

Robert Vollmert <rob@vllmrt.net> skribis:

> This adds the elm compiler, version 0.19.0. This provides the
> `elm` command, with the exception of the `elm reactor` subcommand.
>
> Named `elm-compiler`, to leave space for `elm` as the full elm
> including reactor.
>
> * gnu/packages/elm.scm: New module.
> (elm-compiler): New package.
> * gnu/packages/patches/elm-disable-reactor.patch: New patch.
> * gnu/packages/patches/elm-fix-map-key.patch: New patch.
> * gnu/packages/patches/elm-relax-glsl-bound.patch: New patch.
> * gnu/local.mk: Add new files.

Finally applied with the minor changes below, which address issues
reported by ‘guix lint’ and tweak the synopsis and description.

Note that ‘elm repl’ says that it wants ‘node’ in $PATH, but I think
that’s OK: people who need the REPL can add Node to their environment,
and otherwise they can do without Node, AIUI.

Thank you!

Ludo’.
diff mbox series

Patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 9ac43897d4..aab29beb0a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -774,9 +774,9 @@  dist_patch_DATA =						\
   %D%/packages/patches/einstein-build.patch			\
   %D%/packages/patches/elfutils-tests-ptrace.patch		\
   %D%/packages/patches/elixir-path-length.patch			\
-  %D%/packages/patches/elm-disable-reactor.patch		\
-  %D%/packages/patches/elm-fix-map-key.patch			\
-  %D%/packages/patches/elm-relax-glsl-bound.patch		\
+  %D%/packages/patches/elm-compiler-disable-reactor.patch	\
+  %D%/packages/patches/elm-compiler-fix-map-key.patch		\
+  %D%/packages/patches/elm-compiler-relax-glsl-bound.patch	\
   %D%/packages/patches/emacs-dired-toggle-sudo-emacs-26.patch   \
   %D%/packages/patches/emacs-exec-path.patch			\
   %D%/packages/patches/emacs-fix-scheme-indent-function.patch	\
diff --git a/gnu/packages/elm.scm b/gnu/packages/elm.scm
index e4dea88585..c6a8a81a94 100644
--- a/gnu/packages/elm.scm
+++ b/gnu/packages/elm.scm
@@ -24,7 +24,7 @@ 
   #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages haskell-web)
   #:use-module (guix build-system haskell)
-  #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages))
 
@@ -38,15 +38,17 @@ 
     (version "0.19.0")
     (source
      (origin
-       (method url-fetch)
-       (file-name "elm-0.19.0.tar.gz")
-       (uri "https://github.com/elm/compiler/archive/0.19.0.tar.gz")
+       (method git-fetch)
+       (file-name (git-file-name name version))
+       (uri (git-reference
+             (url "https://github.com/elm/compiler/")
+             (commit version)))
        (sha256
-        (base32 "0g4risrjrvngz3j4wf432j82gjcc8i1b7l5lwbb0fhr24hvz6ka9"))
+        (base32 "0s93z9vr0vp5w894ghc5s34nsq09sg1msf59zfiba87sid5vgjqy"))
        (patches
-        (search-patches "elm-disable-reactor.patch"
-                        "elm-relax-glsl-bound.patch"
-                        "elm-fix-map-key.patch"))))
+        (search-patches "elm-compiler-disable-reactor.patch"
+                        "elm-compiler-relax-glsl-bound.patch"
+                        "elm-compiler-fix-map-key.patch"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-ansi-terminal" ,ghc-ansi-terminal)
@@ -71,8 +73,9 @@ 
        ("ghc-vector" ,ghc-vector)
        ("ghc-zip-archive" ,ghc-zip-archive)))
     (home-page "https://elm-lang.org")
-    (synopsis "The `elm` command line interface, without `elm reactor`")
+    (synopsis "Programming language for Web applications")
     (description
-     "This includes commands like `elm make`, `elm repl`, and many others
-for helping make Elm developers happy and productive.")
+     "This package provides Elm, a statically-typed functional programming
+language for the browser.  It includes commands for developers such as like
+@command{elm make} and @command{elm repl}.")
     (license license:bsd-3)))
diff --git a/gnu/packages/patches/elm-disable-reactor.patch b/gnu/packages/patches/elm-compiler-disable-reactor.patch
similarity index 100%
rename from gnu/packages/patches/elm-disable-reactor.patch
rename to gnu/packages/patches/elm-compiler-disable-reactor.patch
diff --git a/gnu/packages/patches/elm-fix-map-key.patch b/gnu/packages/patches/elm-compiler-fix-map-key.patch
similarity index 100%
rename from gnu/packages/patches/elm-fix-map-key.patch
rename to gnu/packages/patches/elm-compiler-fix-map-key.patch
diff --git a/gnu/packages/patches/elm-relax-glsl-bound.patch b/gnu/packages/patches/elm-compiler-relax-glsl-bound.patch
similarity index 100%
rename from gnu/packages/patches/elm-relax-glsl-bound.patch
rename to gnu/packages/patches/elm-compiler-relax-glsl-bound.patch