From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WKxJFo9HX2J9BQEAbAwnHQ (envelope-from ) for ; Wed, 20 Apr 2022 01:36:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eN4kFo9HX2KywwAAauVa8A (envelope-from ) for ; Wed, 20 Apr 2022 01:36:47 +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 09ADB3B2A6 for ; Wed, 20 Apr 2022 01:36:47 +0200 (CEST) Received: from localhost ([::1]:46218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngxOo-00075b-5U for larch@yhetil.org; Tue, 19 Apr 2022 19:36:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngxNE-00050b-Pn for guix-patches@gnu.org; Tue, 19 Apr 2022 19:35:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50621) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ngxN9-000284-3L for guix-patches@gnu.org; Tue, 19 Apr 2022 19:35:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ngxN8-00067L-VO for guix-patches@gnu.org; Tue, 19 Apr 2022 19:35:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55030] [PATCH 18/30] gnu: elm: Support 'elm reactor'. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Apr 2022 23:35:02 +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: Philip McGrath Received: via spool by 55030-submit@debbugs.gnu.org id=B55030.165041126123325 (code B ref 55030); Tue, 19 Apr 2022 23:35:02 +0000 Received: (at 55030) by debbugs.gnu.org; 19 Apr 2022 23:34:21 +0000 Received: from localhost ([127.0.0.1]:44489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngxMT-000649-CD for submit@debbugs.gnu.org; Tue, 19 Apr 2022 19:34:21 -0400 Received: from mail-vk1-f174.google.com ([209.85.221.174]:42552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngxMR-00063e-4K for 55030@debbugs.gnu.org; Tue, 19 Apr 2022 19:34:19 -0400 Received: by mail-vk1-f174.google.com with SMTP id c4so24347vkq.9 for <55030@debbugs.gnu.org>; Tue, 19 Apr 2022 16:34:19 -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=gw9YjJ+KwmvB6S3vZj70ONpdT4D1gMkaDHIdaVQUayo=; b=MRFztm7uziS3pRwMAx/bF4G0tegaYBXLVuCfIc+63ADZar8LFqUihAX91FCzk+zcvi AoiMpG/0uvHiNUCxbTemaDiJMrtLcN4yB6eJ3W5bMLU84BH4PAqvoGKICAs4J4/L90fu fh2DIpFIumyxhCGYR0ubr9sRJqu99cw5HACXdlwQm7Wbx1f1lYHfYn8WtE6yBVZZCgo3 6UB7eczr0/U5j5jHy/i0YDALBgYAw6x8W7vcD1ld0TAJpz1gsR9j811bExB36Kmndgx7 hChqQjYNvZgG0b/vaRuqd8Tp3ZDIxFPqf6riBrsh+4Dn24XnCPvPQ4eYyaQ8Ht0wqUqV vGxg== 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=gw9YjJ+KwmvB6S3vZj70ONpdT4D1gMkaDHIdaVQUayo=; b=Y7ugfY9wGQUN4NOD9lCqLa54UT5TqC3TcNeu1079ukydCuG6rbBRm8AMpyxrwFl/pq Q10mhUiAYOrbFM7pzCwuaE/7Vr9TFRUOcTTdUCO+pgn2JLB1c5HZnQJEKuoTXU9KQDgL AvczgrixwGVG8drb9NsTdimljdlp2jZM2OPrYGYn0oha3iYeVTTRWxrN9CEnQvX7q68q TZSGTgoNMSiaToRctzKGfopiDz2jjj+p44EsyR2WI4qlmRvvTVgfs4e5dZjRUwyi4tTS N7OPkXJA4nZrhOUktkkeLL1lg6sxaJRW/UKqav5/NeVixSwYc2ZPK9X/L3ZKhY+Pcxa+ oGYg== X-Gm-Message-State: AOAM530Fqk1kLiZPPqc2AAEwAAgTml+tFBkVm3zVG9/LL9dnafcJxauD vuR5U2a9GnyRRTCgg6MVQpOhWE+NMwh6M8XQ X-Google-Smtp-Source: ABdhPJwJzDP53FTaVKVrvDGRSIBcN6LlfV/GIcuYY/re3tD+C9f47ZkFQgPJLImD2WAUADhkJBOrmg== X-Received: by 2002:a1f:9c09:0:b0:344:fe68:fa84 with SMTP id f9-20020a1f9c09000000b00344fe68fa84mr5559134vke.8.1650411253593; Tue, 19 Apr 2022 16:34:13 -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 16-20020a056122089000b0033226f398e6sm178389vkf.33.2022.04.19.16.34.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Apr 2022 16:34:12 -0700 (PDT) From: Philip McGrath Date: Tue, 19 Apr 2022 19:32:02 -0400 Message-Id: <20220419233214.275789-18-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220419233214.275789-1-philip@philipmcgrath.com> References: <20220419232736.272970-1-philip@philipmcgrath.com> <20220419233214.275789-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=1650411407; 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=gw9YjJ+KwmvB6S3vZj70ONpdT4D1gMkaDHIdaVQUayo=; b=NiY7y1f63lpMTdUTXn0n8Nl45nmJOr/eHfGXuiU81l+gufV/c45lUevkyfasfb9pEo9jSS ehQvk1kg6F01LNSQ73fYrtr7/SM601GTn+75AoSULobo5q/jx+x0h1PO3UQO0q5Q4rhw3I kc7fNlJoPQuIbNX9o8/4yOGsz4ZrScnHQ5lr/C5NwxMS0/045xcysTtasYKqkPz4OJR7Av ihRBFzkk9or86ZftV2TdxYtEMWfilTcnhfMpd8WY01oaxLUFQsNKW3vbPrOPHy3X8ec5Vi hdUOval1iGKIR4IV8ArE4HTn85d/ngpQKjzOZyz7lSqmyimsqehlIanHni2A4w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650411407; a=rsa-sha256; cv=none; b=LUDebEgi/NrPEUaXiSgZZWdcmc4dFFt4Y5tzX/HJvJohLhzg42CXBJdIrh594ytmfmXt5P GxqJpwbaBf83P/7F49u2essz3zdKUzzoLqbqaXNqBYS8gsX9aQw1MH1l3++lLvxqBgRWXs FISGYHvjtzakP3m8Kig660SKDAFspxl/273p79gzfOQZg90vCiY9u1+qPdHh5/H5PmMyZb p/3eWBy4oNFM6VT7rE9C53YJS51eO2XIt3nO9/kJtTeoSEvKHOn7bnHwCYrWdoWUu58XBA NsmUwBgrllr6vk07/vXmZq/kqt+AZB8FCKIBHhz+VNuwnFxZS0lcXnlA4DejNg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=MRFztm7u; 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: 2.46 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=MRFztm7u; 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: 09ADB3B2A6 X-Spam-Score: 2.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: aXympBYcxHMH * gnu/packages/elm.scm (elm): Rename to ... (elm-sans-reactor): ... this new variable. [synopsis, description]: Tweak. (elm): New variable. * guix/build-system/elm.scm (default-elm): Use elm-sans-reactor. --- gnu/packages/elm.scm | 75 +++++++++++++++++++++++++++++++++++++-- guix/build-system/elm.scm | 2 +- 2 files changed, 74 insertions(+), 3 deletions(-) diff --git a/gnu/packages/elm.scm b/gnu/packages/elm.scm index 53e250ee22..4181322393 100644 --- a/gnu/packages/elm.scm +++ b/gnu/packages/elm.scm @@ -40,9 +40,9 @@ (define-module (gnu packages elm) ;; `elm reactor` exit with a useful error message if they aren't there. (define %reactor-root-base "share/elm/reactor-") -(define-public elm +(define-public elm-sans-reactor (package - (name "elm") + (name "elm-sans-reactor") (version "0.19.1") (source (origin @@ -93,6 +93,77 @@ (define-public elm ghc-vector ghc-zip-archive)) (home-page "https://elm-lang.org") + (synopsis "Minimal variant of @command{elm}") + (description + "This package provides a version of the Elm compiler without support for +the @command{elm reactor} development command.") + (license license:bsd-3))) + +(define-public elm + (package + (name "elm") + (version (package-version elm-sans-reactor)) + (source (package-source elm-sans-reactor)) + (native-inputs (list elm-sans-reactor)) + (inputs (list elm-sans-reactor + elm-browser + elm-core + elm-html + elm-http + elm-json + elm-project-metadata-utils + elm-svg + elm-explorations-markdown)) + (build-system elm-build-system) + (arguments + (list + #:modules + `((srfi srfi-26) + ,@%elm-default-modules) + #:phases + #~(modify-phases %standard-phases + (delete 'stage) + (replace 'configure + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (with-directory-excursion "reactor" + (patch-application-dependencies)))) + (replace 'build + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (with-directory-excursion "reactor" + (invoke (search-input-file (or native-inputs inputs) + "/bin/elm") + "make" + "--optimize" + "src/NotFound.elm" + "src/Errors.elm" + "src/Index.elm")))) + (replace 'install + (lambda* (#:key inputs #:allow-other-keys) + (let* ((out-dir #$output) + (bin-dir (string-append out-dir "/bin")) + (reactor-dir (string-append out-dir + "/" + #$%reactor-root-base + (getenv "GUIX_ELM_VERSION"))) + (reactor-subdir (string-append reactor-dir "/_elm"))) + ;; We can't use a symlink here because Haskell's + ;; `getExecutablePath` follows all symlinks. + ;; Guix can make it a hard link later. + (install-file (search-input-file inputs ;; NOT native-inputs + "/bin/elm") + bin-dir) + (install-file "reactor/assets/favicon.ico" reactor-dir) + (for-each (cut install-file <> reactor-subdir) + '("reactor/elm.js" + "reactor/assets/styles.css" + ;; TODO: these are source-code-pro v1.017 and + ;; source-sans-pro v1.050: there may be breaking + ;; changes in Guix's existing + ;; font-adobe-source-{code,sans}-pro packages + "reactor/assets/source-code-pro.ttf" + "reactor/assets/source-sans-pro.ttf"))))) + (delete 'validate-compiled)))) + (home-page "https://elm-lang.org") (synopsis "Programming language for Web applications") (description "Elm is a statically-typed, purely-functional programming language for diff --git a/guix/build-system/elm.scm b/guix/build-system/elm.scm index 046e6e0a1f..5e2db3b052 100644 --- a/guix/build-system/elm.scm +++ b/guix/build-system/elm.scm @@ -73,7 +73,7 @@ (define (default-elm) "Return the default Elm package for builds." ;; Lazily resolve the binding to avoid a circular dependency. (let ((elm (resolve-interface '(gnu packages elm)))) - (module-ref elm 'elm))) + (module-ref elm 'elm-sans-reactor))) (define (default-elm-core) "Return the default elm-core package." -- 2.32.0