[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#55030] [PATCH v2 23/34] gnu: Add elm-todomvc.
From: |
Philip McGrath |
Subject: |
[bug#55030] [PATCH v2 23/34] gnu: Add elm-todomvc. |
Date: |
Wed, 18 May 2022 14:11:10 -0400 |
* gnu/packages/elm.scm (elm-todomvc): New variable.
* doc/guix.texi (Build Systems)[elm-build-system]: Mention it.
---
doc/guix.texi | 4 ++--
gnu/packages/elm.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+), 2 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 282cddf798..3d7b3b39c1 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -8748,7 +8748,7 @@ Build Systems
@file{elm.json} files. Using @code{elm-build-system} to build Elm
@dfn{applications} (which declare @code{@{ "type": "application" @}}) is
possible, but requires ad-hoc modifications to the build phases. For
-an example, see the definition of
+examples, see the definitions of the @code{elm-todomvc} example application and
the @code{elm} package itself (because the front-end for the
@samp{elm reactor} command is an Elm application).
@@ -8757,7 +8757,7 @@ Build Systems
@env{ELM_HOME}, but this does not yet work well with @code{elm-build-system}.
This limitation primarily affects Elm applications, because they specify
exact versions for their dependencies, whereas Elm packages specify supported
-version ranges. As a workaround, you can use
+version ranges. As a workaround, the example applications mentioned above use
the @code{patch-application-dependencies} procedure provided by
@code{(guix build elm-build-system)} to rewrite their @file{elm.json} files to
refer to the package versions actually present in the build environment.
diff --git a/gnu/packages/elm.scm b/gnu/packages/elm.scm
index d515d68e8f..9d3a58bcb5 100644
--- a/gnu/packages/elm.scm
+++ b/gnu/packages/elm.scm
@@ -487,3 +487,56 @@ (define-public elm-explorations-markdown
on the @code{marked} project, which focuses on speed.")
(license license:bsd-3)))
+(define-public elm-todomvc
+ (let ((commit "f236e7e56941c7705aba6e42cb020ff515fe3290")
+ (revision "1"))
+ (package
+ (name "elm-todomvc")
+ (version (git-version "1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/evancz/elm-todomvc")
+ (commit commit)))
+ (sha256
+ (base32 "0g37bglzshkf79s4n7aq9ib44h5qn8ng7n72sh2xslgd20h05nfw"))
+ (file-name (git-file-name name version))))
+ (inputs (list elm-browser elm-core elm-html elm-json))
+ (build-system elm-build-system)
+ (arguments
+ (list
+ #:modules
+ `((srfi srfi-26)
+ ,@%elm-default-modules)
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'stage)
+ (replace 'configure
+ patch-application-dependencies)
+ (replace 'build
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (invoke (search-input-file (or native-inputs inputs)
+ "/bin/elm")
+ "make"
+ "src/Main.elm"
+ "--output=elm.js")))
+ (replace 'install
+ (lambda args
+ (let* ((out-dir #$output)
+ (dest-dir
+ (string-append out-dir
+ "/share/"
+ (strip-store-file-name out-dir))))
+ (for-each (cut install-file <> dest-dir)
+ `("elm.js"
+ "index.html"
+ "style.css"
+ "README.md")))))
+ (delete 'validate-compiled))))
+ (home-page "https://github.com/evancz/elm-todomvc")
+ (synopsis "TodoMVC in Elm")
+ (description "This is the official Elm implementation of
+@url{https://todomvc.com,TodoMVC}, a simple to-do--list application used to
+compare front-end web frameworks.")
+ (license license:bsd-3))))
--
2.32.0
- [bug#55030] [PATCH v2 07/34] http-client: 'http-fetch/cached' converts strings to URIs., (continued)
- [bug#55030] [PATCH v2 07/34] http-client: 'http-fetch/cached' converts strings to URIs., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 05/34] build-system/elm: Add implicit Elm inputs., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 13/34] gnu: Add elm-time., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 14/34] gnu: Add elm-url., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 10/34] gnu: Add elm-virtual-dom., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 12/34] gnu: Add elm-svg., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 11/34] gnu: Add elm-html., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 15/34] gnu: Add elm-browser., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 22/34] gnu: elm: Support 'elm reactor'., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 21/34] gnu: Add elm-explorations-markdown., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 23/34] gnu: Add elm-todomvc.,
Philip McGrath <=
- [bug#55030] [PATCH v2 24/34] gnu: Add elm-debois-elm-dom., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 16/34] gnu: Add elm-bytes., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 18/34] gnu: Add elm-http., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 20/34] gnu: Add elm-project-metadata-utils., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 17/34] gnu: Add elm-file., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 25/34] gnu: Add elm-random., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 19/34] gnu: Add elm-parser., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 27/34] gnu: Add elm-danhandrea-elm-date-format., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 26/34] gnu: Add elm-explorations-test., Philip McGrath, 2022/05/18
- [bug#55030] [PATCH v2 28/34] gnu: Add elm-danhandrea-elm-time-extra., Philip McGrath, 2022/05/18