From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WMDrMsfxvmHIoQAAgWs5BA (envelope-from ) for ; Sun, 19 Dec 2021 09:48:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4CCPLsfxvmHvBwAAbx9fmQ (envelope-from ) for ; Sun, 19 Dec 2021 08:48:07 +0000 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 925F134ECD for ; Sun, 19 Dec 2021 09:48:07 +0100 (CET) Received: from localhost ([::1]:42666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myrrS-000820-MN for larch@yhetil.org; Sun, 19 Dec 2021 03:48:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myrrO-0007z7-Ag for guix-patches@gnu.org; Sun, 19 Dec 2021 03:48:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33229) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1myrrO-0007li-14 for guix-patches@gnu.org; Sun, 19 Dec 2021 03:48:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1myrrN-0008MF-Ry for guix-patches@gnu.org; Sun, 19 Dec 2021 03:48:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51655] [PATCH] build-system: haskell: Add =?UTF-8?Q?=E2=80=98package-with-explicit-haskell=E2=80=99?= procedure. References: <7f7b889aebed4c17e3a021883bfed1d67c564109.1636216701.git.public@yoctocell.xyz> Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 19 Dec 2021 08:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51655 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun , 51655@debbugs.gnu.org Cc: Lars-Dominik Braun Received: via spool by 51655-submit@debbugs.gnu.org id=B51655.163990365531979 (code B ref 51655); Sun, 19 Dec 2021 08:48:01 +0000 Received: (at 51655) by debbugs.gnu.org; 19 Dec 2021 08:47:35 +0000 Received: from localhost ([127.0.0.1]:44775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myrqw-0008Ji-KH for submit@debbugs.gnu.org; Sun, 19 Dec 2021 03:47:35 -0500 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:46354 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myrqu-0008JO-EH for 51655@debbugs.gnu.org; Sun, 19 Dec 2021 03:47:33 -0500 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1639903644; bh=lUsSNZCC6TQkYfW8Bh9Lr0xKpAf/40BultOCDXkWCLQ=; h=From:To:Cc:Subject:In-Reply-To:Date; b=RcHJ5xXfffoSiI4GbqTeIfHNMI4RK+mmuku/76I5VfOwyYJh7/J8d71f8Fv5YQwDc Xjel+AUOYC+D5DYb85DBJaLggggURCggw1YSi55sz6nugSIfAQxukacj9686+Bgpa/ glhJYeQHsHN7jF7bo/JRGxC91eFflN8P5i7vSWj0= In-Reply-To: <86bl2lbgvd.fsf@gmail.com> Date: Sun, 19 Dec 2021 09:47:22 +0100 Message-ID: <878rwhouat.fsf@disroot.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639903687; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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=1+EDFJ0KISOrV8DfbN/oFKO07cGjzOyYNPU6Ryn5W60=; b=CfnAgwrC9+m6Tj9rYSltn40zidJQTOYDJOgD6iJnoaorXe2D6EF5qZDqY/knWPIwSfxc4u keSp5xI61hvNs+UQUd7BfGAcXUIhupa5HL3bD/zMbgo7lei9oPyVXgDiqxwIbm+N9UPJYk X8o7nMn5ZacRL5qrZvFQs6bueA2RlpNqU9TfkN2N0tWXcszb8JOHJ+4lXLFcHgap4CC8Ih jd2BYglFu1ZRVigzqz32+I2gtblOudGX80PnVZrqlKQOY4hg31AO3duahY0hKRaVrt/WZ1 Seusmxz2b2vCoH25T64wy6wmDHSqsbJJS7dpe4391sJU3Nq0OCYmI0rm5I5LhA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639903687; a=rsa-sha256; cv=none; b=BgvFrQ6w8kFyq1XdN3ThNnjtskv14WYdh6PHHULnECqucY7LBOS2s8T+tvsMGA6bKIzhI8 s3gnGAVrtUkpA1eJrEqxjg+N7v5mPVVk5jlGDQBjk0GpuCXbGCKNJKt3azrekTkOEcvQiV GQczfj0YB77LexKmCUo7rnS6qTgfm27FAFPvT15wrXejOniknncFEhy+xm4eUyWkah0DNo fRkOZh+UldmCIS47EFnpRr7tuPblSm+ukjioN587cHcPJwNmVRcj43CX5H2fq6oUWaqsgf k0O+XaWcny48XQD9/DNcjmzID7xafPDYGaWni88V6/8yRdnu31c7UeHuGfluvg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=RcHJ5xXf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=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: -4.51 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=RcHJ5xXf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=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: 925F134ECD X-Spam-Score: -4.51 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8YvEiJ+NdJtC --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, On Mo, Nov 15 2021, zimoun wrote: > Hi, > > On Sun, 07 Nov 2021 at 11:55, Xinglu Chen wrote: >> * guix/packages.scm (package-with-explicit-compiler): New procedure; >> factorized from =E2=80=98package-with-explicit-python=E2=80=99. >> * guix/build-system/python.scm (package-with-explicit-python): Use >> =E2=80=98package-with-explicit-compiler=E2=80=99. >> * guix/build-system/haskell.scm (package-with-explicit-haskell): New pro= cedure. >> * doc/guix.texi (Defining Package Variants): Document it. >> --- >> doc/guix.texi | 37 ++++++++++++++++++ >> guix/build-system/haskell.scm | 8 ++++ >> guix/build-system/python.scm | 71 +++++++---------------------------- >> guix/packages.scm | 55 +++++++++++++++++++++++++++ >> 4 files changed, 113 insertions(+), 58 deletions(-) > > Neat refactoring! :-) It is something discussing several times and I do > not know if =E2=80=99package-with-explicit-ocaml=E2=80=99 could not be ad= ded too. The > issue is that it depends on more than only one element for =E2=80=9Ccompi= ling=E2=80=9D: > ocaml, findlib and dune. Ah, yes, I forgot about OCaml. :-) > On the other hand, guix/build-system/gnu.scm contains > =E2=80=99package-with-explicit-inputs*=E2=80=99 which is more or less the= same idea. > And =E2=80=99transform-package-toolchain=E2=80=99 is another instance. I didn=E2=80=99t about =E2=80=98package-with-explicit-inputs*=E2=80=99, but= I will look into it.=20 > This =E2=80=99package-with-explicit-{ocaml,python}=E2=80=99 pre-dates the > transformations and deep rewriting. > > Therefore, maybe refactor could revisit the complete story. > > Well, I had headaches last time I gave a look at transformations. And I > do not know if it is possible to have a generic transformation for > rewriting implicit inputs of all build systems. That=E2=80=99s something= that > could be nice to nice: =E2=80=99package-with-explicit-python=E2=80=99 bas= ed on a > =E2=80=9Cgeneric=E2=80=9D =E2=80=99package-with-explicit-compiler=E2=80= =99 (compiler or toolchain > though) and provides =E2=80=99package-with-explicit-*=E2=80=99 for all bu= ild systems > (ocaml, ghc, emacs, guile, etc.). Yeah, that would be nice to have. I currently have some other things I would like to focus on, but I should look more into package transformations, and hopefully come up with a good solution to this. :-) >> +@lisp >> +(use-modules (guix build-system haskell)) >> + >> +(define (default-haskell-8.8) >> + ;; Lazily resolve the binding to avoid a circular dependency. >> + (let ((haskell (resolve-interface '(gnu packages haskell)))) >> + (module-ref haskell 'ghc-8.8))) >> + >> +(define package-with-haskell-8.8 >> + (package-with-explicit-haskell (delay (default-haskell-8.8)) >> + "ghc-" "ghc-8.8-" >> + #:variant-property 'ghc-8.8-variant)) >> +@end lisp > > As Lars said, an instance is missing, IMHO. Not sure what you are referring to here, what exactly do you mean with =E2=80=9Cinstance=E2=80=9D? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmG+8ZoVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5e9EP/3PxboQBE64JEhoWvB7FmqjxFhyv WMQbr9zfOPSUCmD4jwgjxjgIyOwZe7/yTwKv66rQFGGd2Q3Qo+DmTm/1CTWNllZ6 K2Vt52D+oEjlEplfAqjFsftuiGx3JQm5XfluwakaV1qlOi/nbWS1lpP68iOT2d/W lVoo+F4loXjKkPK/ZpEzWFZk5JW5v15b1X2+/dFhh2cEWwxEweuNVZqDWVSOBaqW jqwkaFgEKeoyj/F21Qmj7oq40gqn56lJtB1kKkV2FbHivTu2l4MoknIYzsyvdV69 P6MQQKCRCHzaLn6JuZLuI65dDqquEt2U7GAYm5OyaHlYO7/PVYUt6/lB/l4KSCV3 dcx1+yTuKKlR06ApRQnVjfiwpqnPX2yTD0DOazN1KNBu907CAAXeLuQxCYLG4TPo 6zWXV8lTZAIVX6uwmVPsnBSJEr/Fk5kw18P8uNgg+fvRB5aV4+Ru/kD+CgwE5F2U eej9opR5APX8T8S+KUfditG458AskKGlhh3x+IW3RTro8dglR6dWZEdwWfK6+hMY 1buf/B/WvwyU8lGwNUwGa5gtlrRc1m1gkQ9zgFJhKrHJJsMBIMXIGWiEpkQTsbEf awr07B0+hFmGzGyn6438YipU/XvVRDqQ/caDxCxiu1lUllBELC7+04rzmk3jFLdV CJnGXc7ahVAPAMNY =rg0J -----END PGP SIGNATURE----- --=-=-=--