From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 2LrsEWpBWGXzVAAA9RJhRA:P1 (envelope-from ) for ; Sat, 18 Nov 2023 05:45:30 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2LrsEWpBWGXzVAAA9RJhRA (envelope-from ) for ; Sat, 18 Nov 2023 05:45:30 +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 B9D4315681 for ; Sat, 18 Nov 2023 05:45:29 +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=EBiLjOEA; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1700282730; 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=5GBvaFBNtGwgkm38AqBwbA9gFkJ1I51OcmdPWd4D06w=; b=Ju0V1N/HhwnhLWgRV7rwHH5eJn2YMY7Gu2kPZYzMBIMgBauJqOSLLVJa8G1eBDZyWylLN8 2zXa/2TV26w436coDyF0L+oOfV9VLwHGX/Kk46pXNx/c7PaM12pQ0j1vva1szitU97SHaf KlLzWQPMgv1uvStu4nKbwDaJrNQHWwztsoIyKVC1TfevVBFa3+yCKOlRyUKV3TsF5IBEVu gbXCyIj2oWMBe1TzcOaVtp4GRqaj+rZblzEe8f12TvJkExEBHmUJpondt4oJeY5FuRpvXf 8yGP4j5XZuR1chOHLaKugcqp5jAyfz0zRAehjp6aQkjlFP3JQxVp0YHcwhmQ4Q== 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=EBiLjOEA; 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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1700282730; a=rsa-sha256; cv=none; b=uOynzJG73OH0cwSOexN/pUkxzcUV8ZUneCQ+hbXcm5K/6KztjJUKvLgGOa0D9sP12JAEq4 RE2WlQdGdfdM0cLS+tn8l4cxvWpuCASE5YFrImwp1Si/KiituQ6V01NotZpfXHda6UtxIS yvixXcAwJuqDBrQmQDb7lbfL/2QwvN7P8RpGoeWUqY8Ne2nMF2IDD2tvqfRNd3XTzDRjai KuQACVwpGxEf6S2qTnVUCK1iI2hATBmK5YLLABbvjExhDNdzJarNhDF+Pmsa8h5v9tzjc1 mo55+B0Fhr9K7WK8+ushBGa5dP5LFAFpHf9OqkVP+f7EJEr1Jtgd9ssmoeS10w== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r4DCg-00019M-8r; Fri, 17 Nov 2023 23:45:12 -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 1r4DCZ-000198-7o for guix-patches@gnu.org; Fri, 17 Nov 2023 23:45:03 -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 1r4DCY-0007MN-UK for guix-patches@gnu.org; Fri, 17 Nov 2023 23:45:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r4DCY-0000AN-Ui for guix-patches@gnu.org; Fri, 17 Nov 2023 23:45:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66801] [PATCH v3 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: Sat, 18 Nov 2023 04:45: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: Liliana Marie Prikler Cc: 66801@debbugs.gnu.org Received: via spool by 66801-submit@debbugs.gnu.org id=B66801.1700282695608 (code B ref 66801); Sat, 18 Nov 2023 04:45:02 +0000 Received: (at 66801) by debbugs.gnu.org; 18 Nov 2023 04:44:55 +0000 Received: from localhost ([127.0.0.1]:47376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4DCQ-00009k-GK for submit@debbugs.gnu.org; Fri, 17 Nov 2023 23:44:54 -0500 Received: from mail-yw1-x112b.google.com ([2607:f8b0:4864:20::112b]:45194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4DCK-00009T-Sb for 66801@debbugs.gnu.org; Fri, 17 Nov 2023 23:44:52 -0500 Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-5c90be2ea21so3124417b3.2 for <66801@debbugs.gnu.org>; Fri, 17 Nov 2023 20:44:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deeplinks-com.20230601.gappssmtp.com; s=20230601; t=1700282682; x=1700887482; 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=5GBvaFBNtGwgkm38AqBwbA9gFkJ1I51OcmdPWd4D06w=; b=EBiLjOEA7tzs7HB83INdJFZeJjklLAD7uCILGKv78dEMBQFoHNSnRw8WCpCtAU55eD KEk7FBJcVonfork6ZUhSxh+Qv+oCZKXh2CHWZ4tvrfhn1Xp2EF8RvwIkkDgM7lNVxYMH wm37W68CtYq8wPUJIPQCtnzMGtSuH7iDNNI+FLPe18zvW0Cw+78HTBXWYMrhRw536yBo qNKUFssBoIp0mP3LPqLVP08cnWQRLWqXhKmijKWPVHOeTL4REKJynO9KC5QYnLEXrHD9 rpGZejbCqD5WYpaMXq+g/Z29zldLXkWsPMItAZD4KKmB7aJGK9k6wTub9aji8ZUQ6K4Y aqqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700282682; x=1700887482; 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=5GBvaFBNtGwgkm38AqBwbA9gFkJ1I51OcmdPWd4D06w=; b=NC9yjjCVcrfDRcuBDNlMeZVTiDWz61Ow138q/O5kzSTH0jZp5lQov8d87VKD8Lp/Pu OUdgWC+tsou97DfK2elJEssgXUy8CVGGV5bVtlnW70vtA3yvrYerCz7DMQ6dOPl4ceED QatyjOqvA6I4goU2qiA5RiLv8VgaDzEK2GuDMp0OdfJE1yHDtaZuJu1ivhofQF8lg5EW FTRTq6sv7qhJN443IqWkQ5DeT45cLstHRm7crZU32A4R22kebzyAxpukRJDC/YTkhfV8 WR9ory5MQx8hLmXba5IegN/65iM13WBcIOl+ZgVTU1oWoxZdYkLawlDrJbGPkSmFvdbQ PMGQ== X-Gm-Message-State: AOJu0YzQvIefzx7NAZ5BGKqc3QfoczDxHTCzOz448I0lJNrlJoPg+5YI MAD7a/lv8zx37OlAp/RFL9ZwyznEzmcfLVIXDEp3gLGj1ikj8+J7ia0= X-Google-Smtp-Source: AGHT+IGKoCCmN4el0DxuI6MdNuPElcBvaHOkb1f4KCPQ41VIKh+aeUuX18taAeWbSApNK7f1ONzc2dVEKSJYmdm4Ma8= X-Received: by 2002:a81:9141:0:b0:5b3:60c2:5781 with SMTP id i62-20020a819141000000b005b360c25781mr1552310ywg.32.1700282682217; Fri, 17 Nov 2023 20:44:42 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Pierre-Henry =?UTF-8?Q?Fr=C3=B6hring?= Date: Sat, 18 Nov 2023 05:44:31 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -5.10 X-Spam-Score: -5.10 X-Migadu-Queue-Id: B9D4315681 X-Migadu-Scanner: mx10.migadu.com X-TUID: 173cZtBxXC61 * WAITING Comment ** lilyp > * guix/build-system/mix.scm, > * guix/build/mix-build-system.scm: New modules. Avoid spanning a change across multiple files. Use file: Change. file2: Likewise. > gnu/packages/elixir.scm | 62 ++++++++++- > guix/build-system/mix.scm | 187 > ++++++++++++++++++++++++++++++++ > guix/build/mix-build-system.scm | 171 +++++++++++++++++++++++++++++ You committed two changes at once here. Split them. ** 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=${GUIX_ELIXIR_LIBS}. ,* guix/build-system/mix.scm: New modules. ,* guix/build/mix-build-system.scm: New modules. #+end_example or something else? * WAITING Comment ** lilyp > +(define* (set-mix-env #:key inputs mix-path mix-exs #:allow-other- > keys) > + "Set environment variables. > +See: > https://hexdocs.pm/mix/1.15.7/Mix.html#module-environment-variables" > + (setenv "MIX_HOME" (getcwd)) > + (setenv "MIX_ARCHIVES" "archives") > + (setenv "MIX_BUILD_ROOT" "_build") > + (setenv "MIX_DEPS_PATH" "deps") > + (setenv "MIX_PATH" (or mix-path "")) > + (setenv "MIX_REBAR3" (string-append (assoc-ref inputs "rebar3") > "/bin/rebar3")) > + (setenv "MIX_EXS" mix-exs) > + (%elixir-version (elixir-version inputs))) %elixir-version is not an environment variable. You should set this up separately or at the very least add a big fat comment explaining what you're doing here :) ** phf What about both? #+begin_src scheme (define* (set-elixir-version #:key inputs #:allow-other-keys) "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." (%elixir-version (elixir-version inputs)) (format #t "Elixir version: ~a~%" (%elixir-version))) #+end_src * WAITING Comment ** lilyp > + (list (search-path-specification > + (variable "GUIX_ERL_LIBS") > + (files (list "lib/erlang/lib" > + (string-append "lib/elixir/" (version- > major+minor version))))))) I suppose ERL is for erlang? What do we use for elixir then? ** phf Changed for ~GUIX_ELIXIR_LIBS~. Is that OK? * WAITING Comment ** lilyp > +(define* (install-dependencies . _) > + "Install dependencies." > + (setenv "ERL_LIBS" (getenv "GUIX_ERL_LIBS"))) Why not do this as part of setting up mix-env? ** phf If we have this phase in the ~elixir~ package: #+begin_src scheme (add-after 'install 'wrap-programs (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (programs '("elixir" "elixirc" "iex" "mix"))) (for-each (lambda (program) (wrap-program (string-append out "/bin/" program) '("ERL_LIBS" prefix ("${GUIX_ELIXIR_LIBS}")))) programs)))) #+end_src and this native search path: #+begin_src scheme (search-path-specification (variable "GUIX_ELIXIR_LIBS") (files (list "lib/erlang/lib" (string-append "lib/elixir/" (version-major+minor version))))) #+end_src then, ~(setenv "ERL_LIBS" (getenv "GUIX_ERL_LIBS"))~ is not needed anymore.