From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id INnALM43hWI9WwAAbAwnHQ (envelope-from ) for ; Wed, 18 May 2022 20:15:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id kOrBLM43hWKKNgAA9RJhRA (envelope-from ) for ; Wed, 18 May 2022 20:15:42 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3D1191A705 for ; Wed, 18 May 2022 20:15:42 +0200 (CEST) Received: from localhost ([::1]:41156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrOCz-0002xK-Az for larch@yhetil.org; Wed, 18 May 2022 14:15:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrOBS-0000B3-1W for guix-patches@gnu.org; Wed, 18 May 2022 14:14:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrOBR-0005Pm-OG for guix-patches@gnu.org; Wed, 18 May 2022 14:14:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nrOBR-0006TT-JH for guix-patches@gnu.org; Wed, 18 May 2022 14:14:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55030] [PATCH v2 23/34] gnu: Add elm-todomvc. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 18 May 2022 18:14:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55030 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55030@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Philip McGrath Received: via spool by 55030-submit@debbugs.gnu.org id=B55030.165289762624748 (code B ref 55030); Wed, 18 May 2022 18:14:05 +0000 Received: (at 55030) by debbugs.gnu.org; 18 May 2022 18:13:46 +0000 Received: from localhost ([127.0.0.1]:33570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrOB7-0006R1-UJ for submit@debbugs.gnu.org; Wed, 18 May 2022 14:13:46 -0400 Received: from mail-vk1-f180.google.com ([209.85.221.180]:45919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrOB6-0006Qn-Su for 55030@debbugs.gnu.org; Wed, 18 May 2022 14:13:45 -0400 Received: by mail-vk1-f180.google.com with SMTP id bc42so1555835vkb.12 for <55030@debbugs.gnu.org>; Wed, 18 May 2022 11:13:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mYWp/2Qk75quDtQhnCzSUlOj3iXPOE/P8zaZZNsNRVI=; b=KuuS6qPxyJYhVEM2FCPpMlkf1YdJXAwDnhx6kWQT/oeLJK94XrO5jvh3tuTYUfkT02 rIpnuU+kycvXk0SNQm+FJiz1uwOvWIkH1a31/c8wIyFfdgGRIL5gGa55T1xvTDi4qafL /DJ0JGOk1ooywfbbnuRRR5HodYKeVa39rgZjX72WPZ840SEOGuHvhKtJW0aTO7cSlOvD 3ht/GuayNvQw5hfcH3LaR03e3BrwblYbB3E2HKkpRwFmHaNl0S8EykrEmH/UcPrlg9Xi VbHx2GSrbS4HqCaiCOcQOGsghLwlkB7djWyvTULU6S2po4y1em3ze4Jaho2b73zWQmGI BDJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mYWp/2Qk75quDtQhnCzSUlOj3iXPOE/P8zaZZNsNRVI=; b=CP0Vx+GotRmkKqEJABEmzJP2vEUloQyFrUtyd0AJFYVeLl9ptoIqIczEE8DMhegtDY HOYlHJR05ZpZ2tTzCn7Bt6v9XZtLRtP057Un3INtu4ep4NOX+icwQoEF8ZWAGYmMaEP7 w7xwLhefqYOFktrDuGo2Nc/ZekX/FXq43XZuBGqbHwMmVrmV9hzM04JxIo7a4XOpzHGh /OXrEHGP+9sRC/S2gLN2gYxwpqVuaf9Jm7otYXGzCPshje49C7CZmo42MjbXtgyECoIQ B0GmEqaEAjMCh5gbzrqpRfFR5OmUsthU7i15jZAqNbCTvPoIsDDHE54YVrGG0zQA8pAN tjQA== X-Gm-Message-State: AOAM531kMhhyPUYnwVwyM1wDNmCU9OTKvSEWE2yhtF0HotFyx/MicMrP zt4o4zXe/Lmb1XojWRs61xGVnY6UXbNdXSiq X-Google-Smtp-Source: ABdhPJyaoRmUQRrqTyFLrLYbT6fInO7qKEulASW95hN0gEOzoN1QuZ5QtW7XmdPL68FxRVug7YXdbw== X-Received: by 2002:a05:6122:1354:b0:351:bed1:611d with SMTP id f20-20020a056122135400b00351bed1611dmr394565vkp.26.1652897619450; Wed, 18 May 2022 11:13:39 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id y2-20020ab05602000000b00368a28612e2sm283746uaa.9.2022.05.18.11.13.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 May 2022 11:13:39 -0700 (PDT) From: Philip McGrath Date: Wed, 18 May 2022 14:11:10 -0400 Message-Id: <0fa04d278eaf50f57c74bedc128c7a97961d0095.1652890702.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: <20220419232736.272970-1-philip@philipmcgrath.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652897742; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=mYWp/2Qk75quDtQhnCzSUlOj3iXPOE/P8zaZZNsNRVI=; b=HwgJ3KIQ7Tv0LQCWhE6RD8iUQtsB2PJLiE4MQ4Fa+Exzdf77oj4eU/QloNvxGNMcMSH3pj 8IYCTCi3eGlceikjwbEOqFUVcw6PbKQ1AFUplxy2T783OFFLL8IX64gfvknknBsTtfnlwo ZgXO51bbNMYoK4x82SzQMVTLwfohfhGez1JjJcHPEsCNJTPsOPhF340SC5+hNhLWb33TTE zV3fMtN4YIHhkbstDz+UF50Pk05sK/P/ig1qvN371xFx+taglourye+jY+qgnOXqShFFaN EF2T62/6sooHevPFYUJeJSEAOp96t5Y7z0QKbi8tVhlMzaOYHpLviFZzekNMOg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652897742; a=rsa-sha256; cv=none; b=HS3dx4+aYdXCvduik+aHzjOThaW2QJi3MSHL9gaKK4V/KQlnFyMLwTFWGhEXh3LQtLSW8V 0QgPHVu8HQ3k27btqD6hSHBXfQJDElHtRNBjNI3fEFNBbEiHBX/Dq5eyV0QuK7etAtMSl3 /2pJRzxc7hKYQ6rGA51Aqx/u5adZ8FnnONOGcjQWnToC0pIJIloAhWOne56p9YdfBWA2d7 vDL1Y1rOK26q17mJcMyi/B2BE69trhwvPgcqXEv+Rpfde+t2k5mOIpIEfV5kbwQkttBk2j jXbRhabv8HKqSijw6pRcE7opEVcs/l7bXAFdV8RrZjzqYTMdvQ6XmEb9p3JJUw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=KuuS6qPx; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 3.46 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=KuuS6qPx; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 3D1191A705 X-Spam-Score: 3.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: d42OaGLeqEnS * 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