From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id cMGaLhNkWGVerAAA9RJhRA:P1 (envelope-from ) for ; Sat, 18 Nov 2023 08:13:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id cMGaLhNkWGVerAAA9RJhRA (envelope-from ) for ; Sat, 18 Nov 2023 08:13:23 +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 3094F3FFF9 for ; Sat, 18 Nov 2023 08:13:23 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=GytNKU+O; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1700291603; a=rsa-sha256; cv=none; b=M8uFmI3WpRq1fM61LNY3GTXrkv0ygOEch6ARY9KUJZoeQ5a7cRbZyLwBWRoUchNo7J2lY9 8J1nsfeUN9z/buX2PDLAvwLMUt6bylyjjUkCPkLHEovB/BzHkaiHsnpviy8TKhJ6bMpbRc f/yTsjM7xl/OKmoq52V7rXcVoZu9hJ917cDIiiwWU/d0I5PEa+JJmNQEkWNrqnOrG4qP3s 3o6R2qWzhvMAlaGkigFWgcSxfVh+zQVWmueFpvVBFC04w8dgWRcaqfCDx+TY6WAbLIxnnC 2GOnEN44/b8JkoQ3vS1k02UwB+qbLBHQ8PbpBtjKNib0Z5SzppYyJXrLIRRQfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1700291603; 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: 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=vq5/Jn0/1d8Eeche24b6h7OWEKYT7fRFieG8DGkqK9U=; b=KASEo1i/B6IFDpBrsgH8Gu4UqAJUBgPv3cQkAI2pfsY+dNfy8EkpSTBn4ZFpiUtxm1UeZ6 Fp0POgtn1urufsdpOoCDBaNreLa0xTgRcYA7P87t8hfkt9NOvPZkgyFYIYkTE03CWdWkZV zpopssXUxbskByndq3XDKU+Fvh76OmE3PdklUwPDERNZLxWDUaJCt52NI2uCS+qMurqIgJ 88lad5xp48jvGztGLhc1OknU5FAb/PKDMsyGZsrux8naPaw5+rvjWCDg2Y2BavU64VQ1ho 0fVkMyJyyTwMdVDXFFaVtqEJVwLJvbroTosM7SUQ+Oo7VLSjVUYFBhtxKOpodA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=GytNKU+O; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r4FVo-0001Gi-Ax; Sat, 18 Nov 2023 02:13:04 -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 1r4FVm-0001Fz-Je for guix-patches@gnu.org; Sat, 18 Nov 2023 02:13:02 -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 1r4FVm-0008CD-83 for guix-patches@gnu.org; Sat, 18 Nov 2023 02:13:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r4FVm-0004Lt-JJ for guix-patches@gnu.org; Sat, 18 Nov 2023 02:13:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66801] [PATCH v3 01/14] build-system: Add mix-build-system. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 18 Nov 2023 07:13:02 +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: Pierre-Henry =?UTF-8?Q?Fr=C3=B6hring?= Cc: 66801@debbugs.gnu.org Received: via spool by 66801-submit@debbugs.gnu.org id=B66801.170029155116678 (code B ref 66801); Sat, 18 Nov 2023 07:13:02 +0000 Received: (at 66801) by debbugs.gnu.org; 18 Nov 2023 07:12:31 +0000 Received: from localhost ([127.0.0.1]:47699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4FVG-0004Kv-HS for submit@debbugs.gnu.org; Sat, 18 Nov 2023 02:12:30 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:59754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4FVA-0004Ke-Qd for 66801@debbugs.gnu.org; Sat, 18 Nov 2023 02:12:28 -0500 Received: by mail-wm1-x341.google.com with SMTP id 5b1f17b1804b1-4083cd3917eso1760945e9.3 for <66801@debbugs.gnu.org>; Fri, 17 Nov 2023 23:12:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700291538; x=1700896338; darn=debbugs.gnu.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=vq5/Jn0/1d8Eeche24b6h7OWEKYT7fRFieG8DGkqK9U=; b=GytNKU+OLMKYU+5ACAnfqqOVmITP8CXfhr/fqPv8vCwolGjpunuIAPo1afKgk2tYgi 2TBr3PxMtmn03pQCXZmfZlAFiHndCUeBQH/7nXN3pDScGbOi0mLqWLVbFSUBeq+b3Vrc 2q7k1idPtO5CDGudGIh9ooLrYlxLhfYwPuA3H6tGMJJ7LTIoQFmkOOiSNDDb67gcL4eH q9ft51Ad+thUfUwIo1pO8/nrJWGRO8d8PHJsruIJr9ss07PMR2s8Dto19LKVXfIU2+4R cuU2L0fVjU91bJ86YPWaS5J6sX3E5t+DY/L8vMOl46LrTRXgCynUC64aUvTcuZohi3zE VNOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700291538; x=1700896338; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=vq5/Jn0/1d8Eeche24b6h7OWEKYT7fRFieG8DGkqK9U=; b=D0qR9PLvJ1BW36aYywJInKPJRr0Q78q+vn5ZncevZ1hUfJYNKINH6jwryvRwapp4Bz kmKIrmqgBSU0RqozjlzmHJycgL360VKsKsWPkAEEetk8okTCuseHlS5MlpScXsrYlgqc P7buI82sG/RMPQV72leBTX5kUppI5qcjL/dDyrA70aD8mF99uocINi7mDhIkWIiT6qPb Q6yRNssJoRzoRIjBmx4KE9g3S2uvlG4YE8w5NDMYPo9d2br+D7EptHkxSLHj7gJfm6QX oCuuL6NmVHmmyxfja1b13kpb4XNkLcjS+P6S07je3v1tE+JS/WYQKAko/K9m7uhxepRY AQvg== X-Gm-Message-State: AOJu0Yy+RgOsWLaIB+DXsgT7xz9Cs6bMKzZy4fMRt6jLFAkzNGVd3jCL 9ZRETk83HcHkxNyv3EHzvqo6bzVnc8J8pw== X-Google-Smtp-Source: AGHT+IFrM4GSI7e979gjPHwTpFI1iAwv+cMWF40CKhM7Xfx8l0Co8TEmu0leyfpFRvsQ0s39Wp+MsA== X-Received: by 2002:a05:600c:4f94:b0:409:2c5:b2cd with SMTP id n20-20020a05600c4f9400b0040902c5b2cdmr1105357wmq.14.1700291537587; Fri, 17 Nov 2023 23:12:17 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id j33-20020a05600c1c2100b0040772934b12sm9927250wms.7.2023.11.17.23.12.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 23:12:16 -0800 (PST) Message-ID: From: Liliana Marie Prikler Date: Sat, 18 Nov 2023 08:12:14 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 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-Scanner: mx11.migadu.com X-Spam-Score: 2.91 X-Migadu-Queue-Id: 3094F3FFF9 X-Migadu-Spam-Score: 2.91 X-TUID: RM1yk1sLuZxV Am Samstag, dem 18.11.2023 um 05:44 +0100 schrieb Pierre-Henry Fr=C3=B6hring: > * WAITING Comment > ** lilyp > > * guix/build-system/mix.scm, > > * guix/build/mix-build-system.scm: New modules. > Avoid spanning a change across multiple files.=C2=A0 Use > file: Change. > file2: Likewise. >=20 > > =C2=A0gnu/packages/elixir.scm=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 |=C2=A0 62 ++++++++++- > > =C2=A0guix/build-system/mix.scm=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 1= 87 > > ++++++++++++++++++++++++++++++++ > > =C2=A0guix/build/mix-build-system.scm | 171 > > +++++++++++++++++++++++++++++ > You committed two changes at once here.=C2=A0 Split them. >=20 >=20 > ** phf > How are changes counted? I've counted one because all of these > changes > are needed > to introduce the ~mix-build-system~. Should it be: > #+begin_example > ,* gnu/packages/elixir.scm (elixir): Search path GUIX_ELIXIR_LIBS > added. > ,* gnu/packages/elixir.scm (elixir): Wrap programs with > ERL_LIBS=3D${GUIX_ELIXIR_LIBS}. > ,* guix/build-system/mix.scm: New modules. > ,* guix/build/mix-build-system.scm: New modules. > #+end_example > or something else? You can add the two build-system files in one go. The changes to elixir and the new elixir-hex package are one patch each. > * WAITING Comment > ** lilyp > > +(define* (set-mix-env #:key inputs mix-path mix-exs #:allow-other- > > keys) > > +=C2=A0 "Set environment variables. > > +See: > > https://hexdocs.pm/mix/1.15.7/Mix.html#module-environment-variables > > " > > +=C2=A0 (setenv "MIX_HOME" (getcwd)) > > +=C2=A0 (setenv "MIX_ARCHIVES" "archives") > > +=C2=A0 (setenv "MIX_BUILD_ROOT" "_build") > > +=C2=A0 (setenv "MIX_DEPS_PATH" "deps") > > +=C2=A0 (setenv "MIX_PATH" (or mix-path "")) > > +=C2=A0 (setenv "MIX_REBAR3" (string-append (assoc-ref inputs "rebar3") > > "/bin/rebar3")) > > +=C2=A0 (setenv "MIX_EXS" mix-exs) > > +=C2=A0 (%elixir-version (elixir-version inputs))) > %elixir-version is not an environment variable.=C2=A0 You should set this > up > separately or at the very least add a big fat comment explaining what > you're doing here :) >=20 >=20 > ** phf > What about both? > #+begin_src scheme > (define* (set-elixir-version #:key inputs #:allow-other-keys) > =C2=A0 "Set Elixir version. > Compiled libraries are specific to each Elixir version. If a library > is intended > to be used with multiple Elixir versions, it needs to be compiled > separately for > each version. The parameter %elixir-version, set for the current > build, is used > to differentiate between the compiled versions of libraries > corresponding to > different Elixir versions." > =C2=A0 (%elixir-version (elixir-version inputs)) > =C2=A0 (format #t "Elixir version: ~a~%" (%elixir-version))) > #+end_src I just noticed that, but do prefer to spaces after sentence ending periods. For the docstring, I think you should make clear what is going on from the beginning, e.g.=C2=A0 "Store the version number of the elixir input in a parameter."=20 > * WAITING Comment > ** lilyp > > +=C2=A0=C2=A0=C2=A0=C2=A0 (list (search-path-specification > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (va= riable "GUIX_ERL_LIBS") > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (fi= les (list "lib/erlang/lib" > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= (string-append "lib/elixir/" (version- > > major+minor version))))))) > I suppose ERL is for erlang?=C2=A0 What do we use for elixir then? >=20 >=20 > ** phf > Changed for ~GUIX_ELIXIR_LIBS~. Is that OK? No, because it's still ERL on the other side. A quick web search reveals that this belongs to erlang.=20 >=20 > * WAITING Comment > ** lilyp > > +(define* (install-dependencies . _) > > +=C2=A0 "Install dependencies." > > +=C2=A0 (setenv "ERL_LIBS" (getenv "GUIX_ERL_LIBS"))) > Why not do this as part of setting up mix-env? >=20 >=20 > ** phf > If we have this phase in the ~elixir~ package: > #+begin_src scheme > (add-after 'install 'wrap-programs > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (lambd= a* (#:key inputs outputs #:allow-other-keys) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 (let* ((out (assoc-ref outputs "out")) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (programs '("elixir" "elix= irc" "iex" "mix"))) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 (for-each (lambda (program) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 (wrap-program (string-append out "/bin/" > program) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 '("ERL_LIBS" prefix > ("${GUIX_ELIXIR_LIBS}")))) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 programs)))) > #+end_src >=20 > and this native search path: > #+begin_src scheme > (search-path-specification > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (varia= ble "GUIX_ELIXIR_LIBS") > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (files= (list "lib/erlang/lib" > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (s= tring-append "lib/elixir/" > (version-major+minor version))))) > #+end_src >=20 > then, ~(setenv "ERL_LIBS" (getenv "GUIX_ERL_LIBS"))~ is not needed > anymore. True, but it's still given in the source files. :) So you can delete it of course (if it's already done by the native- search-path and package as you claim), or you can make it part of the environment setup (if it's not). Cheers