From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 8GBfHTpOU2UkhAAAG6o9tA:P1 (envelope-from ) for ; Tue, 14 Nov 2023 11:38:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 8GBfHTpOU2UkhAAAG6o9tA (envelope-from ) for ; Tue, 14 Nov 2023 11:38:50 +0100 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 262ED11051 for ; Tue, 14 Nov 2023 11:38:50 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=deeplinks-com.20230601.gappssmtp.com header.s=20230601 header.b="3Z2/CJZ/"; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1699958330; 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=Tv0Mu0o5HZWgNm5ikv8AIQD3QGSYbl+uTKhSMhVQfN0=; b=gUP1DjzDAt366UBLOsC5wmhwySjztKJCJ3uPrgB0OJN7gFEPv1yKK/2PF7Dl0Ta/ZqILZx X20APsJ1SviBkyP15lc1o5+1I2nPE5g+scFRtdL2BBd48VHuQwhinmvDfPpeunYPVyCiC9 xChjpUgjyqmkm/8K7lgili9ok8lUAhJhCUsgnD36Lvbvv9Re9RhTI9O1XdoUE6Ixjv8gFZ 8gdzMMpr43cCzTexmaLg2bs0fS9Jva9eEe4Lf54l+HpSzDhsTpZWY8VvClP9pd0ieZd3dS abW6NP5Q0dWrgsk9FchRwvALza3+ZXO8VKGtA/vn3PkSkAMZPnyrnTQYa5b66A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=deeplinks-com.20230601.gappssmtp.com header.s=20230601 header.b="3Z2/CJZ/"; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1699958330; a=rsa-sha256; cv=none; b=cJaHgT0SthvTtU65RXkmzGuV5zlyAVc+3Cb3RNU/v2B5UEynmN/Zdsfgl9CxM9N+Pn31tZ YytH5cMI4I8sw2U8q50xLL6crkeClLlCAiBldaxbcrCFpr+wQRfZKmgShJbGcX/4FJhfpl TLqiw7+Ev4qTy4ypzBNwwa1nXnLeCky1JRUhontylOdf4dgS9vb3OnIJRsiQGFFKRMOYSJ MJHpPXzSiilr5u1dzf9/OiDOpD2VDWUhVuQSe5rDS3xqwZktg/ladjhDDmbO9sLYsUjMMJ SJhYawK7boXlYOlWdVVD7ZnetLoeZvnTPA84vDcTx+0sqv48JZwtjQxMZHKD4A== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2qoM-0008PB-5t; Tue, 14 Nov 2023 05:38:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r2qoF-0008Ox-Sj for guix-patches@gnu.org; Tue, 14 Nov 2023 05:38:21 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2qoF-00023o-Jr for guix-patches@gnu.org; Tue, 14 Nov 2023 05:38:19 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r2qov-0002pg-KZ for guix-patches@gnu.org; Tue, 14 Nov 2023 05:39:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66801] ['PATCH v2' 01/14] build-system: Add mix-build-system. Resent-From: Pierre-Henry =?UTF-8?Q?Fr=C3=B6hring?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 14 Nov 2023 10:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66801 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66801@debbugs.gnu.org Cc: Liliana Marie Prikler Received: via spool by 66801-submit@debbugs.gnu.org id=B66801.169995829510836 (code B ref 66801); Tue, 14 Nov 2023 10:39:01 +0000 Received: (at 66801) by debbugs.gnu.org; 14 Nov 2023 10:38:15 +0000 Received: from localhost ([127.0.0.1]:60081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2qoA-0002oh-EH for submit@debbugs.gnu.org; Tue, 14 Nov 2023 05:38:14 -0500 Received: from mail-yw1-x112d.google.com ([2607:f8b0:4864:20::112d]:55786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2qo5-0002oR-H3 for 66801@debbugs.gnu.org; Tue, 14 Nov 2023 05:38:13 -0500 Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-5a7c08b7744so63364577b3.3 for <66801@debbugs.gnu.org>; Tue, 14 Nov 2023 02:37:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deeplinks-com.20230601.gappssmtp.com; s=20230601; t=1699958241; x=1700563041; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Tv0Mu0o5HZWgNm5ikv8AIQD3QGSYbl+uTKhSMhVQfN0=; b=3Z2/CJZ/u8aUUIx0JbpScHZOszwFRJ4nM/3a+2BdP7+zRHraD4NeuFHS1s1T8mxl+L NLyBMPz2nR2QWB2gNI84D9JBXK0bNdYhmWQxON7KCSyUmtl6rLHKdhC5TTcLna6Dke9N xGUfwfgCbYQzy/rWOhoiJVVe5bwBOhDp5nOqkhl/B7zxfS6QiW7zPa9HCLl6EiA7EUqV QcnnRXCEEp4Gz4ciycD9UwlTzSBnlYZji5HnX9Na8KPKiy2VcOgWbHmQJxJl9wyn8p8o 9C4ZGpN1XmIZ2xNJ7qRA2el8i+EVS/km3yWqZuPnLIqzacIDHDEtnHL4LvMpx0qo2wL7 /GpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699958241; x=1700563041; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Tv0Mu0o5HZWgNm5ikv8AIQD3QGSYbl+uTKhSMhVQfN0=; b=foFFuf5wBu77OMSZLVuba+Hm+eOYiEGsQexHfbulCNtcLjSKkVx3kZ77pVypQxpFTR cVLKX1dIrKO1T5cX805qWU4TcLUdw4cWiBGBhudGdtHvh9T/KbdoUazmo1Hz0Al/dxxO DyqSC2RpABkGB1ao6d7fgkKlJXXrGMNkt2Fz+yXNH/ee2zBbtK8ujIocaS2CAimSkyND 9AvoNdXWmS+CJrAPKCHCAV1dhg7lu/WegM2NMkGe0fSh4dqozGDQSbEkiuZ2ePDULA90 eGsRg4BCXExvddNNpCGXfcwmSYZsZtK9go6kjj/zE5P+70d7zI6xIUyIsuicm09Old6M whJw== X-Gm-Message-State: AOJu0Yxcl8j0W4UW9o86HT18AZRdTXEkI2fgEZ7yEG0J2jy34Zc+kRLF Xv22vOT811TZ5KPp6Cz6g1oC8rMcL11G4dDJiiIuz7t5pEr7ehi9+GA= X-Google-Smtp-Source: AGHT+IGucm4lWPtwc+FJ5KQuQA1H+DITBCWPx2eBCykDwofxBCcAcEJaJ33rMljBzX3IwIAe3GFQ0o6cqyRbagXOQ/s= X-Received: by 2002:a81:a504:0:b0:5a8:204c:5c9b with SMTP id u4-20020a81a504000000b005a8204c5c9bmr9598656ywg.18.1699958241588; Tue, 14 Nov 2023 02:37:21 -0800 (PST) MIME-Version: 1.0 References: <26ef9c0f4bf2ff942ba2b42e1fadeb6174bbaa6a.1699906775.git.phfrohring@deeplinks.com> In-Reply-To: From: Pierre-Henry =?UTF-8?Q?Fr=C3=B6hring?= Date: Tue, 14 Nov 2023 11:37:10 +0100 Message-ID: Content-Type: multipart/alternative; boundary="0000000000001f869b060a1a5f4f" 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -2.09 X-Spam-Score: -2.09 X-Migadu-Queue-Id: 262ED11051 X-Migadu-Scanner: mx10.migadu.com X-TUID: GG5fk4sSFQkm --0000000000001f869b060a1a5f4f Content-Type: text/plain; charset="UTF-8" > > +(define-module (guix build-system mix) > > + #:use-module (gnu packages base) > > + #:use-module (gnu packages elixir) > > + #:use-module (gnu packages elixir-xyz) > > + #:use-module (gnu packages erlang) > You probably want to resolve those imports rather than use-modules > them. You mean something like this? #+begin_src scheme (define-module (guix build-system mix) #:use-module ((gnu packages base) #:select (glibc make-glibc-utf8-locales)) #:use-module ((gnu packages elixir) #:select (elixir elixir-hex)) #:use-module ((gnu packages erlang) #:select (rebar3)) #+end_src I have moved `elixir-hex' to elixir.scm to avoid a circular dependency. > > +(define (input=? input1 input2) > > + "Tell whether inputs INPUT1 and INPUT2 are equal." > > + (define pkg1 (match input1 ((_ pkg) pkg))) > > + (define pkg2 (match input2 ((_ pkg) pkg))) > > + (string=? (package-name pkg1) (package-name pkg2))) > Again, checking for label equivalence is a bad idea. OK, after reading a bit more about Guile, I understand that `equal?' is what should be used here, right? The intent is to remove duplicated inputs in the code below: #+begin_src scheme (define all-propagated-inputs ((compose (cut delete-duplicates <> equal?) ;<-- Here (cut filter erlang-or-elixir-input? <>) (cut append-map package-transitive-propagated-inputs <>) (cut map cadr <>)) (append inputs native-inputs))) #+end_src > > +(define (elixir-input? X.Y input) > > + "Determines if the given INPUT is an Elixir input." > > + (match input > > + ((label . path) > > + ;; XXX: The second condition may be enough. > > + (and (elixir-name? label) > > + (directory-exists? (path->elixir-lib path X.Y)))))) > Ahem, search-path-as-list. > Also, leaking the version is kinda bad, API-wise. Does this mean that build artifacts should be installed under `$out/lib/elixir/$libname` instead of `$out/lib/elixir/X.Y/$libname`? Cheers --0000000000001f869b060a1a5f4f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> > +(define-module (guix build-system mix)
> = > + =C2=A0#:use-module (gnu packages base)
> > + =C2=A0#:use-mo= dule (gnu packages elixir)
> > + =C2=A0#:use-module (gnu packages = elixir-xyz)
> > + =C2=A0#:use-module (gnu packages erlang)
>= You probably want to resolve those imports rather than use-modules
>= them.

You mean something like this?
#+begin_src scheme
(defin= e-module (guix build-system mix)
=C2=A0 #:use-module ((gnu packages base= ) #:select (glibc make-glibc-utf8-locales))
=C2=A0 #:use-module ((gnu pa= ckages elixir) #:select (elixir elixir-hex))
=C2=A0 #:use-module ((gnu p= ackages erlang) #:select (rebar3))
#+end_src

I have m= oved `elixir-hex' to elixir.scm to avoid a circular dependency.

=
> > +(define (input=3D? input1 input2)
> > + =C2=A0"= ;Tell whether inputs INPUT1 and INPUT2 are equal."
> > + =C2= =A0(define pkg1 (match input1 ((_ pkg) pkg)))
> > + =C2=A0(define = pkg2 (match input2 ((_ pkg) pkg)))
> > + =C2=A0(string=3D? (packag= e-name pkg1) (package-name pkg2)))
> Again, checking for label equiva= lence is a bad idea.

OK, after reading a bit more about Guile, I und= erstand that `equal?'
is what should be used here, right? The intent= is to remove duplicated
inputs in the code below:

#+begin_src sc= heme
(define all-propagated-inputs
=C2=A0 =C2=A0 ((compose
=C2=A0 = =C2=A0 =C2=A0 (cut delete-duplicates <> equal?) ;<-- Here
=C2= =A0 =C2=A0 =C2=A0 (cut filter erlang-or-elixir-input? <>)
=C2=A0 = =C2=A0 =C2=A0 (cut append-map package-transitive-propagated-inputs <>= )
=C2=A0 =C2=A0 =C2=A0 (cut map cadr <>))
=C2=A0 =C2=A0 =C2=A0(= append inputs native-inputs)))
#+end_src


> > +(define (= elixir-input? X.Y input)
> > + =C2=A0"Determines if the given= INPUT is an Elixir input."
> > + =C2=A0(match input
> = > + =C2=A0 =C2=A0((label . path)
> > + =C2=A0 =C2=A0 ;; XXX: Th= e second condition may be enough.
> > + =C2=A0 =C2=A0 (and (elixir= -name? label)
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(directory-e= xists? (path->elixir-lib path X.Y))))))
> Ahem, search-path-as-lis= t.
> Also, leaking the version is kinda bad, API-wise.

Does th= is mean that build artifacts should be installed under
`$out/lib/elixir/= $libname` instead of `$out/lib/elixir/X.Y/$libname`?


Cheers
--0000000000001f869b060a1a5f4f--