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 SIs1LgZHX2JZmwAAbAwnHQ (envelope-from ) for ; Wed, 20 Apr 2022 01:34:30 +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 SB9HLgZHX2J7OwEA9RJhRA (envelope-from ) for ; Wed, 20 Apr 2022 01:34:30 +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 8B950F051 for ; Wed, 20 Apr 2022 01:34:30 +0200 (CEST) Received: from localhost ([::1]:42378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngxMb-0004I7-Gw for larch@yhetil.org; Tue, 19 Apr 2022 19:34:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngxMC-0003b3-CI for guix-patches@gnu.org; Tue, 19 Apr 2022 19:34:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50569) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ngxMB-0001x0-AB for guix-patches@gnu.org; Tue, 19 Apr 2022 19:34:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ngxMB-00061e-7i for guix-patches@gnu.org; Tue, 19 Apr 2022 19:34:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55030] [PATCH 05/30] build-system/elm: Add implicit Elm inputs. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Apr 2022 23:34:03 +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.165041119822969 (code B ref 55030); Tue, 19 Apr 2022 23:34:03 +0000 Received: (at 55030) by debbugs.gnu.org; 19 Apr 2022 23:33:18 +0000 Received: from localhost ([127.0.0.1]:44436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngxLS-0005yJ-74 for submit@debbugs.gnu.org; Tue, 19 Apr 2022 19:33:18 -0400 Received: from mail-ua1-f52.google.com ([209.85.222.52]:38657) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngxLR-0005xt-1Q for 55030@debbugs.gnu.org; Tue, 19 Apr 2022 19:33:17 -0400 Received: by mail-ua1-f52.google.com with SMTP id y2so18230uaq.5 for <55030@debbugs.gnu.org>; Tue, 19 Apr 2022 16:33:17 -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=QKeYglNIu3HHMWV3L5gQX7UUrWLR4YJ0MvRfu6gJH/s=; b=d+Pm39zoKTBbCpTLYedfWxuADUnaP8cKIHnMNZoFjKTON+/BwqIeMqpXnXZynA77SB c1OqeFbEdl3oUeFIaXyGS8eOmPJ1Ez2xV1fyKnR5UzRbfrKhYxCtZxJ/wdMkz1UfKoQS vS4xG+oM4ywxQHYwC0FWMMtVRYf68HRmwtAoCgmO958vkPbgCblBMucCHn5xjK1qTAqQ yvtBWcdJXnja0RBa5AyjVfEf9+uDucBPBOoPr+KF7Lf/LY83UUCIUlcMhI+lak8fVWbR sCvfE6HqKNq/tgqowCzERwZnmV5lDeUnDui3sbabno7k3c3Pq4ukEaBmepDfYGUuzQvm qwjA== 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=QKeYglNIu3HHMWV3L5gQX7UUrWLR4YJ0MvRfu6gJH/s=; b=umMukhQFI2mAwLqZ/i1na2+UPXR0gUJ9EVlA7aJLEHSiAC38lIXuWsUadP+P2LV2p/ 6ASpPSnvriErxe3LbmYXKloT1TuIEdYgZGt8UauGLmicC8WClOZaA7poa0RvMrTlhKUh 0Etra7XoKc88Oy0BXrcqQeQfeYi4oruBvN+5rVoR9pSBqv7YNR3h3dn2kFoDduAGrS2v g5Q83y2TARKZ1+wQd2MBZQTKWj79/RQU0Ai3IV+mj+gX4PPib7nMTZt/ms2OPAaJOFKy H8zObSIgh9Rf+z0BaGwFOoxJNM6XIrltTR/vCImaWMrfDwSfK8d6m48KY3te0KTt9O1G mcXQ== X-Gm-Message-State: AOAM530vB5dNm/VJAHKijS7nHANl2vmImYdF2H+15OvAXrpTKPLEWGeF H8KN1u9bGKfkEL/lrDsupwcjPoW1Vv936wOc X-Google-Smtp-Source: ABdhPJxj02N+ujjjM5gi1PVK4W87TD3yzgHvA5rec5MPeXodbxt8NXbYxUC7kL/VirWVQXvsHEejeg== X-Received: by 2002:ab0:4504:0:b0:351:2448:a093 with SMTP id r4-20020ab04504000000b003512448a093mr4601562uar.121.1650411191500; Tue, 19 Apr 2022 16:33:11 -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 q187-20020a6743c4000000b0032a4ae71201sm170065vsa.29.2022.04.19.16.33.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Apr 2022 16:33:10 -0700 (PDT) From: Philip McGrath Date: Tue, 19 Apr 2022 19:31:49 -0400 Message-Id: <20220419233214.275789-5-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=1650411270; 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=QKeYglNIu3HHMWV3L5gQX7UUrWLR4YJ0MvRfu6gJH/s=; b=aqMRXtzcWG0xBO4VlCAYK/boDsQJyjyrxE6+J8FNfY2M0/d5crhwI9rSiehJYiCaIMRTyP KJXdlculnJsOucmkApDxGrWmxPuTvb2ouwlDF/i/CoapCfthLvURlX7b++ie7jzBUqriey dZSULIWmhGQ4OiPl6kPKOKXQlg1pgDNGFBFIbUi+ltn3BYJCkUpXFgi5R+sWJ0Dx61IJDC 5u3qoQmZOuwPkQRsWM1eU5tEKJAhEgDhg1EEPJDoh+XxFoDiwCGLuui+r4r1S5NAVDR0HG dsiGJHmIFWmrRFlzjaAddywKn4LAI3RFXBcE+NdYd6WDWKkuw7oBkxrpPiDFjQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650411270; a=rsa-sha256; cv=none; b=mB8wMo7p3VKGFJd/Df3nKaFQqj2WAV4z90+OVyi7bHgVocxZaRuuxAcUaEcR06M8DaXji8 ImIGy5+QfMbhp+L5UJziBk59emvf4X7tFlf926UxjkRzUMuNZq7kpoAPYo9bTBI3tAC7de j3w8obtXnDlNSAKSmsWKpx88Vfi68Ls5qWybGYDnhSzKhin3xh6WYNNJ1gLkHEdG+L90YX zA8GtPopO5C5gEjdUVA3Rvng3D7BnqolSjjv7CoAu8QjvlNImas0sEdaksR0OWg/eYAxIE +nZDm9Uwryg88uNydbKnhMSJQU9sQDQ+HtxHDp3nIDed5JD/3wvcMNYlRXjIWw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=d+Pm39zo; 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=d+Pm39zo; 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: 8B950F051 X-Spam-Score: 2.46 X-Migadu-Scanner: scn1.migadu.com X-TUID: iJbTns7gIjTy * guix/build-system/elm.scm (default-elm-core): New variable. (default-elm-json): Likewise (lower): Use them as implicit inputs when applicable. --- guix/build-system/elm.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/guix/build-system/elm.scm b/guix/build-system/elm.scm index bf77df6519..046e6e0a1f 100644 --- a/guix/build-system/elm.scm +++ b/guix/build-system/elm.scm @@ -75,6 +75,18 @@ (define (default-elm) (let ((elm (resolve-interface '(gnu packages elm)))) (module-ref elm 'elm))) +(define (default-elm-core) + "Return the default elm-core package." + ;; Lazily resolve the binding to avoid a circular dependency. + (let ((elm (resolve-interface '(gnu packages elm)))) + (module-ref elm 'elm-core))) + +(define (default-elm-json) + "Return the default elm-json package." + ;; Lazily resolve the binding to avoid a circular dependency. + (let ((elm (resolve-interface '(gnu packages elm)))) + (module-ref elm 'elm-json))) + (define* (lower name #:key source inputs native-inputs outputs system target (implicit-elm-package-inputs? #t) @@ -99,6 +111,26 @@ (define private-keywords '()) ,@inputs ("elm" ,elm) + ,@(cond + (implicit-elm-package-inputs? + ;; These are needed for elm-build-system even if not actually + ;; needed by the package being built. But "elm/json" is often + ;; present in practice, and "elm/core" always is: only add the + ;; default packages if no suitable inputs have been given explicitly. + (filter-map (match-lambda + ((name get-default) + (cond + ((find (match-lambda + ((_ pkg . _) + (equal? name (package-upstream-name pkg)))) + inputs) + #f) + (else + `(,name ,(get-default)))))) + `(("elm/core" ,default-elm-core) + ("elm/json" ,default-elm-json)))) + (else + '())) ;; TODO: probably don't need most of (standard-packages) ,@(standard-packages))) (outputs outputs) -- 2.32.0