From b6c0f18dee39d0adb2b8e7019e3d7cc5be9f933d Mon Sep 17 00:00:00 2001 From: Philip McGrath Date: Wed, 18 May 2022 14:11:10 -0400 Subject: gnu: Add elm-todomvc. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/elm.scm (elm-todomvc): New variable. * doc/guix.texi (Build Systems)[elm-build-system]: Mention it. Signed-off-by: Ludovic Courtès --- gnu/packages/elm.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'gnu/packages/elm.scm') 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)))) -- cgit v1.2.3