From unknown Mon Aug 18 00:03:41 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#73458 <73458@debbugs.gnu.org> To: bug#73458 <73458@debbugs.gnu.org> Subject: Status: Fix mix-build-system bugs (73453 , 73454) Reply-To: bug#73458 <73458@debbugs.gnu.org> Date: Mon, 18 Aug 2025 07:03:41 +0000 retitle 73458 Fix mix-build-system bugs (73453 , 73454) reassign 73458 guix-patches submitter 73458 paul severity 73458 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 24 13:32:49 2024 Received: (at submit) by debbugs.gnu.org; 24 Sep 2024 17:32:49 +0000 Received: from localhost ([127.0.0.1]:58953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1st9P5-0001w9-Rs for submit@debbugs.gnu.org; Tue, 24 Sep 2024 13:32:49 -0400 Received: from lists.gnu.org ([209.51.188.17]:43770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1st9P3-0001vS-GH for submit@debbugs.gnu.org; Tue, 24 Sep 2024 13:32:46 -0400 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 1st8x3-0002sJ-5F for guix-patches@gnu.org; Tue, 24 Sep 2024 13:03:49 -0400 Received: from confino.investici.org ([2a11:7980:1::2:0]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1st8x0-0007dv-Hu for guix-patches@gnu.org; Tue, 24 Sep 2024 13:03:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1727197423; bh=ybh5NJtVmZeGdXw9KVQQOpKt3BZYeiIRWh0sda3/s/s=; h=Date:To:From:Subject:From; b=FoyFP0efGdKICVAhbclO1SYKCFbnegOJzrTSGO4FdbzLnBAKwaNFyObVtArBqxelJ 3lsHn0yj3CR5y97Jtlkk2olNykQjfSt/xPArzkGXXGfhmkN5Kq7ZSGPTgGXx61N7Z/ 6Dbk6karKf4VBtUen4jgu0YEkveqjsA50pd39IAE= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4XCmR31FjSz117k for ; Tue, 24 Sep 2024 17:03:43 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4XCmR30tZGz117j for ; Tue, 24 Sep 2024 17:03:43 +0000 (UTC) Message-ID: Date: Tue, 24 Sep 2024 19:03:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 To: guix-patches@gnu.org Content-Language: en-US From: paul Subject: Fix mix-build-system bugs (73453 , 73454) Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a11:7980:1::2:0; envelope-from=goodoldpaul@autistici.org; helo=confino.investici.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Dear Guix, I'm sending an updated patchset to fix a couple of bugs [0][1] with the mix-build-system. Thank you for your work, giacomo [0]: https://issues.guix.gnu.org/73453 [1]: https://issues.guix.gnu.org/73454 From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 04:25:22 2024 Received: (at 73458) by debbugs.gnu.org; 25 Sep 2024 08:25:22 +0000 Received: from localhost ([127.0.0.1]:45989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stNKr-0005Jn-Df for submit@debbugs.gnu.org; Wed, 25 Sep 2024 04:25:21 -0400 Received: from confino.investici.org ([93.190.126.19]:37685) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stNKo-0005JU-FN for 73458@debbugs.gnu.org; Wed, 25 Sep 2024 04:25:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1727252691; bh=dmUfTgj4jlTzjZv9WPEbEAZwBXjrc6L3ydRkFUAtMNA=; h=From:To:Cc:Subject:Date:From; b=GZjISEXZuuzBQ/5q0yRWw+loO3uZj7FErqT2CAvqmMAPXarI1wmYmEmCepiR9JKv4 V+j60KYgcg/DNLAZi8L8bdd6T+Z+3ydahmpD6E8YdFtF93YeXTM3/lMHs+lZZOZ4s9 7+ZuoOHilqHjVMk1eevVoAIIwatHg20b+YuTJDhc= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4XD8sv0xmPz117g; Wed, 25 Sep 2024 08:24:51 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4XD8sv00f0z10yS; Wed, 25 Sep 2024 08:24:50 +0000 (UTC) From: Giacomo Leidi To: 73458@debbugs.gnu.org Subject: [PATCH 1/2] build-system: mix: Allow loading Erlang dependencies in Mix driven builds. Date: Wed, 25 Sep 2024 10:24:32 +0200 Message-ID: <58afb3593e28f5f670b2be516a165b59e2665276.1727252673.git.goodoldpaul@autistici.org> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73458 Cc: Giacomo Leidi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Fixes * guix/build/mix-build-system.scm (elixir-relative-libdir): New variable; (elixir-libdir): call elixir-relative-libdir; (set-erl-env): this new phase sets ERL_LIBS to allow Erlang's virtual machine to load Erlang dependencies in Mix builds, in addition to Elixir ones; (%standard-phases): add set-erl-env phases. Change-Id: Ic1ef5db20680bfd265fbac72bafb760d21135f68 --- guix/build/mix-build-system.scm | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/guix/build/mix-build-system.scm b/guix/build/mix-build-system.scm index 0b021da791..41f6061444 100644 --- a/guix/build/mix-build-system.scm +++ b/guix/build/mix-build-system.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2023 Pierre-Henry Fröhring ;;; Copyright © 2024 Igor Goryachev +;;; Copyright © 2024 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -39,10 +40,15 @@ (define-module (guix build mix-build-system) ;; minor version number of the Elixir used in the build. (define %elixir-version (make-parameter "X.Y")) +(define (elixir-relative-libdir version) + "Return the relative path inside a package namespace in the store where all +libraries for a specified Elixir VERSION are installed." + (string-append "lib/elixir/" version)) + (define* (elixir-libdir path #:optional (version (%elixir-version))) "Return the path where all libraries under PATH for a specified Elixir VERSION are installed." - (string-append path "/lib/elixir/" version)) + (string-append path "/" (elixir-relative-libdir version))) (define* (strip-prefix name #:optional (prefix "elixir-")) "Return NAME without the prefix PREFIX." @@ -94,6 +100,17 @@ (define* (set-mix-env #:key inputs mix-path mix-exs #:allow-other-keys) (setenv "MIX_PATH" (or mix-path "")) (setenv "MIX_REBAR3" (string-append (assoc-ref inputs "rebar3") "/bin/rebar3"))) +(define* (set-erl-env #:key inputs #:allow-other-keys) + "Add dependencies in Elixir's load path." + (setenv "ERL_LIBS" + (string-join (search-path-as-list + `("lib/erlang/lib" + ,(elixir-relative-libdir (elixir-version inputs))) + (map (match-lambda + ((label . package) package)) + inputs)) + ":"))) + (define* (set-elixir-version #:key inputs #:allow-other-keys) "Store the version number of the Elixir input in a parameter." (%elixir-version (elixir-version inputs)) @@ -152,6 +169,7 @@ (define %standard-phases (delete 'configure) (add-after 'install-locale 'set-mix-env set-mix-env) (add-after 'set-mix-env 'set-elixir-version set-elixir-version) + (add-after 'set-elixir-version 'set-erl-env set-erl-env) (replace 'unpack unpack) (replace 'build build) (replace 'check check) base-commit: 3ac69c1a757430d6dfdd37eb948ba1d6967967cc -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 04:25:28 2024 Received: (at 73458) by debbugs.gnu.org; 25 Sep 2024 08:25:28 +0000 Received: from localhost ([127.0.0.1]:46002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stNKx-0005KI-0v for submit@debbugs.gnu.org; Wed, 25 Sep 2024 04:25:27 -0400 Received: from confino.investici.org ([93.190.126.19]:36801) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stNKv-0005K3-0S for 73458@debbugs.gnu.org; Wed, 25 Sep 2024 04:25:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1727252691; bh=iJVeFyn9Nw7+EcXxvjuAGiCPRxPkavef58GRgl9pFzo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kFw20mgCo26mWf/z5fd77bC7Xx84u0B8aH9kN6c5ntR6yCwn+YyVY4//NLa6cCRcH Nb/NFkkut9dPlavh0nTufl0z5werPSl6aLQEYH7LBhczPnfyV1EkxYWqtFiJ6hstDc POx6Lq0kFP1J2RlQm+0yvwvJSNedcXLcPCPOiJRE= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4XD8sv36clz10ym; Wed, 25 Sep 2024 08:24:51 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4XD8sv2HwTz10yS; Wed, 25 Sep 2024 08:24:51 +0000 (UTC) From: Giacomo Leidi To: 73458@debbugs.gnu.org Subject: [PATCH 2/2] build-system: mix: Fix decoding of package names with git versions. Date: Wed, 25 Sep 2024 10:24:33 +0200 Message-ID: <573318832af8089d4b974598cc284d1a2b5b3cd9.1727252673.git.goodoldpaul@autistici.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <58afb3593e28f5f670b2be516a165b59e2665276.1727252673.git.goodoldpaul@autistici.org> References: <58afb3593e28f5f670b2be516a165b59e2665276.1727252673.git.goodoldpaul@autistici.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73458 Cc: Giacomo Leidi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Fixes * guix/build/mix-build-system.scm (%git-version-rx): New variable, (package-name->elixir-name): use %git-version-rx to discriminate git versions from regular ones. Change-Id: Icc6dc56c3db62dfbc17c7c71354a7a7e3d2e5b2a --- guix/build/mix-build-system.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/guix/build/mix-build-system.scm b/guix/build/mix-build-system.scm index 41f6061444..7250785914 100644 --- a/guix/build/mix-build-system.scm +++ b/guix/build/mix-build-system.scm @@ -40,6 +40,9 @@ (define-module (guix build mix-build-system) ;; minor version number of the Elixir used in the build. (define %elixir-version (make-parameter "X.Y")) +(define %git-version-rx + (make-regexp "^(.*)-[0-9]+(\\.[0-9]+)?(\\.[0-9]+)?-[0-9]+\\..+$")) + (define (elixir-relative-libdir version) "Return the relative path inside a package namespace in the store where all libraries for a specified Elixir VERSION are installed." @@ -141,10 +144,12 @@ (define* (remove-mix-dirs . _) (define (package-name->elixir-name name+ver) "Convert the Guix package NAME-VER to the corresponding Elixir name-version -format. Example: elixir-a-pkg-1.2.3 -> a_pkg" +format. Example: elixir-a-pkg-1.2.3 -> a_pkg or elixir-a-pkg-0.0.0-0.e51e36e +-> a_pkg" + (define git-version? (regexp-exec %git-version-rx name+ver)) ((compose (cute string-join <> "_") - (cute drop-right <> 1) + (cute drop-right <> (if git-version? 2 1)) (cute string-split <> #\-)) (strip-prefix name+ver))) -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 14:44:26 2024 Received: (at 73458) by debbugs.gnu.org; 25 Sep 2024 18:44:26 +0000 Received: from localhost ([127.0.0.1]:48627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stWzy-0000DH-0R for submit@debbugs.gnu.org; Wed, 25 Sep 2024 14:44:26 -0400 Received: from mail-ej1-f66.google.com ([209.85.218.66]:48380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stWzt-0000Cx-P9 for 73458@debbugs.gnu.org; Wed, 25 Sep 2024 14:44:25 -0400 Received: by mail-ej1-f66.google.com with SMTP id a640c23a62f3a-a8a7b1c2f2bso29740766b.0 for <73458@debbugs.gnu.org>; Wed, 25 Sep 2024 11:43:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727289769; x=1727894569; darn=debbugs.gnu.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=vVkHAj3qaA7s7dODk6x8P4mAS61+ljk/eiK9KYGaxlo=; b=miP0Jnp9gNPA04iQt84cU006Ohvl+t2JBRSqBZ/1itDKbQSycegTq4ntxwzj3gs+D2 UDwJU8a71fzWbyXRRUSmTlnbRLfkp7NDQJiK9w41shyCpR6UthCiTnhhJy+SXqFtBEWR lr7DKZ56/AifA0IB5C55QRWHPEZrqMj4FiUltPeQ+yF2jNn73aQJZVW3wI5W4UTXfT8+ U7kB66X1MKYh9DFximh3V6u95KhEo3gYpZbT7656Us6r/ofIQM/C7YmV9KSK8j0tAgpa ORF5FAILeXj4DDGT3fu3kq/IFp23T2FAELgSVi61KUXJHyDxouBSbd0UzuiUUZDETTUU BT0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727289769; x=1727894569; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=vVkHAj3qaA7s7dODk6x8P4mAS61+ljk/eiK9KYGaxlo=; b=pUau2MuMMos7xjo216IjO48aoN2xvgHpG2fIuc8+sIT+C5rtDyvEA/NIcCAGCdJxcB FGcB7BA9OAsojzqgSdYK5AULzQYlsTs/CMr+eqKEPuvMqJ3vFsvVIdhKPztumOZHRY9/ QzuwXzqBvLj32oYhjL7ia6OJhqcXoAvz8Y5Viavk6A6NNesO//C+17uAVGq6VKB4rvgK PSznhNGLE2YmqAS0iBYME2k1CUikCRAkGTfRt5c64Hn0Y4Y8JYRThaYUJvpKUVM7UTUm EUNBykKX9/5D4R/pkDciwOhlEcBdjpQRBzbRIh095nyrYe3jgPOA7iTpUH+srRk0iOQh OUSg== X-Forwarded-Encrypted: i=1; AJvYcCWX6UNrquR0WOUoID+jc6bTkxTgAdUllrkFw8ZjS3Q5gghZpMMdyqJdOfNj+fibfSIjvxQYRw==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yx9KUatg6NfA/bJpFqY7r8WAbkAPdj5idYv/qGkyjsI6+GqPNxt 8QacBDWwhAVeBWFzFIGWHN0CLgLRbnLDCUke6ZRYkolzN3R0S46s X-Google-Smtp-Source: AGHT+IGHWnOaZjl6GboJ9ae/dhp5fezV/Fs/DQbBnHchGZ18n4O89FK5+vPaeAQ6320dZ1XvZFyDbA== X-Received: by 2002:a17:907:1c9a:b0:a8a:8c04:ce9f with SMTP id a640c23a62f3a-a93a05f20cemr338459566b.52.1727289769245; Wed, 25 Sep 2024 11:42:49 -0700 (PDT) Received: from lumine.fritz.box (85-127-114-32.dsl.dynamic.surfer.at. [85.127.114.32]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9392f34922sm241775866b.34.2024.09.25.11.42.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2024 11:42:48 -0700 (PDT) Message-ID: <6cf3afb19eb7e810b9b4c422c07246b99d15830f.camel@gmail.com> Subject: Re: [PATCH 1/2] build-system: mix: Allow loading Erlang dependencies in Mix driven builds. From: Liliana Marie Prikler To: Giacomo Leidi , 73458@debbugs.gnu.org Date: Wed, 25 Sep 2024 20:42:47 +0200 In-Reply-To: <58afb3593e28f5f670b2be516a165b59e2665276.1727252673.git.goodoldpaul@autistici.org> References: <58afb3593e28f5f670b2be516a165b59e2665276.1727252673.git.goodoldpaul@autistici.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 73458 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Am Mittwoch, dem 25.09.2024 um 10:24 +0200 schrieb Giacomo Leidi: > Fixes Note: It's not official yet, but Fixes: is nice for a trailer.=20 If it fits into 80 columns, you can also do Fixes: [shortdoc] . > * guix/build/mix-build-system.scm (elixir-relative-libdir): New > variable; > (elixir-libdir): call elixir-relative-libdir; Use full sentences, end each with a period (dot). > (set-erl-env): this new phase sets ERL_LIBS to allow Erlang's virtual > machine to load Erlang dependencies in Mix builds, in addition to > Elixir > ones; > (%standard-phases): add set-erl-env phases. >=20 > Change-Id: Ic1ef5db20680bfd265fbac72bafb760d21135f68 > --- > =C2=A0guix/build/mix-build-system.scm | 20 +++++++++++++++++++- > =C2=A01 file changed, 19 insertions(+), 1 deletion(-) >=20 > diff --git a/guix/build/mix-build-system.scm b/guix/build/mix-build- > system.scm > index 0b021da791..41f6061444 100644 > --- a/guix/build/mix-build-system.scm > +++ b/guix/build/mix-build-system.scm > @@ -1,6 +1,7 @@ > =C2=A0;;; GNU Guix --- Functional package management for GNU > =C2=A0;;; Copyright =C2=A9 2023 Pierre-Henry Fr=C3=B6hring > =C2=A0;;; Copyright =C2=A9 2024 Igor Goryachev > +;;; Copyright =C2=A9 2024 Giacomo Leidi > =C2=A0;;; > =C2=A0;;; This file is part of GNU Guix. > =C2=A0;;; > @@ -39,10 +40,15 @@ (define-module (guix build mix-build-system) > =C2=A0;; minor version number of the Elixir used in the build. > =C2=A0(define %elixir-version (make-parameter "X.Y")) > =C2=A0 > +(define (elixir-relative-libdir version) > +=C2=A0 "Return the relative path inside a package namespace in the store > where all > +libraries for a specified Elixir VERSION are installed." > +=C2=A0 (string-append "lib/elixir/" version)) > + > =C2=A0(define* (elixir-libdir path #:optional (version (%elixir-version))= ) > =C2=A0=C2=A0 "Return the path where all libraries under PATH for a specif= ied > Elixir > =C2=A0VERSION are installed." > -=C2=A0 (string-append path "/lib/elixir/" version)) > +=C2=A0 (string-append path "/" (elixir-relative-libdir version))) Rather than having two procedures here, I think calling elixir-libdir on "lib/erlang/lib" does what you want. > =C2=A0(define* (strip-prefix name #:optional (prefix "elixir-")) > =C2=A0=C2=A0 "Return NAME without the prefix PREFIX." > @@ -94,6 +100,17 @@ (define* (set-mix-env #:key inputs mix-path mix- > exs #:allow-other-keys) > =C2=A0=C2=A0 (setenv "MIX_PATH" (or mix-path "")) > =C2=A0=C2=A0 (setenv "MIX_REBAR3" (string-append (assoc-ref inputs "rebar= 3") > "/bin/rebar3"))) > =C2=A0 > +(define* (set-erl-env #:key inputs #:allow-other-keys) > +=C2=A0 "Add dependencies in Elixir's load path." > +=C2=A0 (setenv "ERL_LIBS" > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (string-join (sea= rch-path-as-list > +=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 `("lib/e= rlang/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=C2= =A0 ,(elixir-relative-libdir (elixir-version > inputs))) > +=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 (map (ma= tch-lambda > +=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=C2=A0 ((label . package) package)) > +=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 inputs)) > +=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(define* (set-elixir-version #:key inputs #:allow-other-keys) > =C2=A0=C2=A0 "Store the version number of the Elixir input in a parameter= ." > =C2=A0=C2=A0 (%elixir-version (elixir-version inputs)) > @@ -152,6 +169,7 @@ (define %standard-phases > =C2=A0=C2=A0=C2=A0=C2=A0 (delete 'configure) > =C2=A0=C2=A0=C2=A0=C2=A0 (add-after 'install-locale 'set-mix-env set-mix-= env) > =C2=A0=C2=A0=C2=A0=C2=A0 (add-after 'set-mix-env 'set-elixir-version set-= elixir-version) > +=C2=A0=C2=A0=C2=A0 (add-after 'set-elixir-version 'set-erl-env set-erl-e= nv) I think we can reorder this so that set-elixir-version is called first and set-erl-env can be inlined into set-mix-env. Cheers From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 16:55:15 2024 Received: (at 73458) by debbugs.gnu.org; 25 Sep 2024 20:55:15 +0000 Received: from localhost ([127.0.0.1]:54504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stZ2Y-0000lW-J4 for submit@debbugs.gnu.org; Wed, 25 Sep 2024 16:55:15 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:46448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stYv3-0000IE-Lx for 73458@debbugs.gnu.org; Wed, 25 Sep 2024 16:47:30 -0400 Received: by mail-lf1-f65.google.com with SMTP id 2adb3069b0e04-537a399e06dso404770e87.1 for <73458@debbugs.gnu.org>; Wed, 25 Sep 2024 13:47:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727297157; x=1727901957; darn=debbugs.gnu.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=fUacfjSmPjRKgvIhXNXxNLnk2Wkjn8Jueoin1fDLWWY=; b=kLRWFWIydX2XQCnnqVMga8GicIDPl1ziAm1+0yUj010SBwkeiT+oFSTxAK4pHT/7EY 5AV9aMcxmAvxvmIV+IbeVjuQuBguFzty35WE026iKB29QK9hq19RdYArUIxQkguNePnX I2S8lD6FWNQhaTSE3c1JaHRnCa5Dt8dZvHdFV7/oRIWzVhNoMajoimaEoCMImxA5bKb0 1ZnFsUMKYOYkTGlPDiRfLD6XbXEmEyHNOG2fxGu7J2vUyvDti0M5Vc9wBAs0tdBIoVzF 0BciBoYAtY/Dk7XFG7oVfpRG3t8SkyoBOR5htwm+3SkTFF2q/W9LfPJxme8/NffvxXsu 621Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727297157; x=1727901957; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=fUacfjSmPjRKgvIhXNXxNLnk2Wkjn8Jueoin1fDLWWY=; b=frx1B7gQ/ntn9X0uXEh6oU/YR3FCowqQ8uNsTcU4rQWVor0ArTYkA7YQn/r/9CX2qp cHIDzpkPNdFknIfmooE26JiSqQFEveFcQ2SBAjyxcGnA9DRC9qYQXfTrvs3cTd4loBDI oPly6EUFO7MfWVWDugmgfRwYhupBD8GY4VebqtqsR+tZbZCeipxDbz4DYnosPFHYpfpg Dy4m2YKE/9VXKTjG9DZGQSemtw4mQYNOKOazJ2z6+tXnqrOkzN/gkddKJv+ZXVKK3efz 8wqLT417SaY1kWvTeqHeTRlL4hJz+KH+xd83xhPbdHzn32v0aJMFjVGLxFIjsFkSFgAa S0KQ== X-Forwarded-Encrypted: i=1; AJvYcCXuZpbpM2EjrJpEZee9fxqdocYI2elVsz3B8DX9ZxOqDONm53LAKPJuzzqGM19CZf4ROg8iEA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwGTIrFKpBpYHmqdTRKHl+xeyvuAYO1LxuDPTbyETtYq3m4DTSk HM8OzwzIkj39l98PELjKfwRpoT5eT0hey0LRssKrnLGQRfrgFJfm4PNXLc7B X-Google-Smtp-Source: AGHT+IHN43Vujf17pSyjAlmqPxloMlEUQb7ec41mIeUjF/Ez5/cKQPua0eQo5xxooS4+/SEaJ2/AVg== X-Received: by 2002:a5d:554e:0:b0:37c:cee9:4682 with SMTP id ffacd0b85a97d-37ccee94741mr4487f8f.54.1727294064150; Wed, 25 Sep 2024 12:54:24 -0700 (PDT) Received: from lumine.fritz.box (85-127-114-32.dsl.dynamic.surfer.at. [85.127.114.32]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c5cf496856sm2247401a12.24.2024.09.25.12.54.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2024 12:54:22 -0700 (PDT) Message-ID: <8264dde7b19aa96fb004f0aeb7908c43db6ad926.camel@gmail.com> Subject: Re: [PATCH 2/2] build-system: mix: Fix decoding of package names with git versions. From: Liliana Marie Prikler To: Giacomo Leidi , 73458@debbugs.gnu.org Date: Wed, 25 Sep 2024 21:54:21 +0200 In-Reply-To: <573318832af8089d4b974598cc284d1a2b5b3cd9.1727252673.git.goodoldpaul@autistici.org> References: <58afb3593e28f5f670b2be516a165b59e2665276.1727252673.git.goodoldpaul@autistici.org> <573318832af8089d4b974598cc284d1a2b5b3cd9.1727252673.git.goodoldpaul@autistici.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 73458 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Am Mittwoch, dem 25.09.2024 um 10:24 +0200 schrieb Giacomo Leidi: > Fixes >=20 > * guix/build/mix-build-system.scm (%git-version-rx): New variable, > (package-name->elixir-name): use %git-version-rx to discriminate git > versions from regular ones. >=20 > Change-Id: Icc6dc56c3db62dfbc17c7c71354a7a7e3d2e5b2a > --- > =C2=A0guix/build/mix-build-system.scm | 9 +++++++-- > =C2=A01 file changed, 7 insertions(+), 2 deletions(-) >=20 > diff --git a/guix/build/mix-build-system.scm b/guix/build/mix-build- > system.scm > index 41f6061444..7250785914 100644 > --- a/guix/build/mix-build-system.scm > +++ b/guix/build/mix-build-system.scm > @@ -40,6 +40,9 @@ (define-module (guix build mix-build-system) > =C2=A0;; minor version number of the Elixir used in the build. > =C2=A0(define %elixir-version (make-parameter "X.Y")) > =C2=A0 > +(define %git-version-rx > +=C2=A0 (make-regexp "^(.*)-[0-9]+(\\.[0-9]+)?(\\.[0-9]+)?-[0-9]+\\..+$")= ) > + This regexp appears unsafe to me. It matches a numeric component in the package name as well. > =C2=A0(define (elixir-relative-libdir version) > =C2=A0=C2=A0 "Return the relative path inside a package namespace in the = store > where all > =C2=A0libraries for a specified Elixir VERSION are installed." > @@ -141,10 +144,12 @@ (define* (remove-mix-dirs . _) > =C2=A0 > =C2=A0(define (package-name->elixir-name name+ver) > =C2=A0=C2=A0 "Convert the Guix package NAME-VER to the corresponding Elix= ir > name-version > -format.=C2=A0 Example: elixir-a-pkg-1.2.3 -> a_pkg" > +format.=C2=A0 Example: elixir-a-pkg-1.2.3 -> a_pkg or elixir-a-pkg-0.0.0= - > 0.e51e36e > +-> a_pkg" > +=C2=A0 (define git-version? (regexp-exec %git-version-rx name+ver)) > =C2=A0=C2=A0 ((compose > =C2=A0=C2=A0=C2=A0=C2=A0 (cute string-join <> "_") > -=C2=A0=C2=A0=C2=A0 (cute drop-right <> 1) > +=C2=A0=C2=A0=C2=A0 (cute drop-right <> (if git-version? 2 1)) > =C2=A0=C2=A0=C2=A0=C2=A0 (cute string-split <> #\-)) I think we might have it easier if we pick the left side from a string- split with #\. Ideally, package names should not contain dots. > =C2=A0=C2=A0=C2=A0 (strip-prefix name+ver))) Cheers From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 17:48:38 2024 Received: (at 73458) by debbugs.gnu.org; 25 Sep 2024 21:48:38 +0000 Received: from localhost ([127.0.0.1]:57980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stZsE-0004oJ-Cu for submit@debbugs.gnu.org; Wed, 25 Sep 2024 17:48:38 -0400 Received: from confino.investici.org ([93.190.126.19]:40725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stZsC-0004o1-1C for 73458@debbugs.gnu.org; Wed, 25 Sep 2024 17:48:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1727299802; bh=Nqx6PA0Jf9wKaE1Eb1Ju2rh5Mn8uQS2Ys6feEwdHaDk=; h=Date:Subject:To:References:From:In-Reply-To:From; b=o5P+6e88lsPmU7piOe3KER12mDdT8QDWCPCv/V0QTqyYwIaABD2JZLjbqjy5/4Pnx MoRqxawNA06hG0iom5bXxcmdPO5Xh3gM6fuLocdtLbTZorr0bRPJcNhVolq5kLYdCm 4Dq1cHmrq9xu0g3MAOdxg2uCGVtVlnv5kDxeq/7Y= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4XDVHt4yryz1139; Wed, 25 Sep 2024 21:30:02 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4XDVHt4Jg1z112b; Wed, 25 Sep 2024 21:30:02 +0000 (UTC) Message-ID: <17618f3c-2e80-f45a-b655-838420bce576@autistici.org> Date: Wed, 25 Sep 2024 23:30:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [PATCH 2/2] build-system: mix: Fix decoding of package names with git versions. Content-Language: en-US To: Liliana Marie Prikler , 73458@debbugs.gnu.org References: <58afb3593e28f5f670b2be516a165b59e2665276.1727252673.git.goodoldpaul@autistici.org> <573318832af8089d4b974598cc284d1a2b5b3cd9.1727252673.git.goodoldpaul@autistici.org> <8264dde7b19aa96fb004f0aeb7908c43db6ad926.camel@gmail.com> From: paul In-Reply-To: <8264dde7b19aa96fb004f0aeb7908c43db6ad926.camel@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 73458 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.6 (---) Hi Liliana, Thank you for your help! I'm sending  v2 addressing your comments. I dropped the elixir-relative-libdir procedure all together because after some experimentation over at [0] it doesn't seem to be actually required. About splitting at dots it would complicate the logic imho as you would need to discriminate dots between version numbers and the dot before the commit. If you don't consider this as a blocking issue I think the regexp should be enough for the cases I tried. Thank you for your work, giacomo [0]: https://github.com/fishinthecalculator/bonfire-guix From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 17:48:39 2024 Received: (at 73458) by debbugs.gnu.org; 25 Sep 2024 21:48:39 +0000 Received: from localhost ([127.0.0.1]:57983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stZsE-0004oO-Ms for submit@debbugs.gnu.org; Wed, 25 Sep 2024 17:48:39 -0400 Received: from confino.investici.org ([93.190.126.19]:21083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stZsC-0004o0-1h for 73458@debbugs.gnu.org; Wed, 25 Sep 2024 17:48:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1727300384; bh=+Fmpc3fg3rCXUBLbuPdJBWXm5nhoBoSBUQy+Sv8yZCQ=; h=From:To:Cc:Subject:Date:From; b=uPX5mGlrhX5SiPIEnhBzq2gMta55echDyPbDbFSt5IhqJ3jY9MNWi6vZMn0bxHFJn lxYKap3oosOapLrLnJ1i4FGEX3BLgZQ3RSDYBuWPq2hEB5Z0Iks++koHblKsGXtv2a TOd9IJoyJJmHj4tdbA7L785/NoGh/QyfLiqOPUig= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4XDVW42gLCz114r; Wed, 25 Sep 2024 21:39:44 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4XDVW421stz114j; Wed, 25 Sep 2024 21:39:44 +0000 (UTC) From: Giacomo Leidi To: 73458@debbugs.gnu.org Subject: [PATCH v2 1/2] build-system: mix: Allow loading Erlang dependencies in Mix driven builds. Date: Wed, 25 Sep 2024 23:39:17 +0200 Message-ID: X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73458 Cc: Giacomo Leidi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * guix/build/mix-build-system.scm (set-mix-env): sets ERL_LIBS to allow Erlang's virtual machine to load Erlang dependencies in Mix builds. Fixes Change-Id: Ic1ef5db20680bfd265fbac72bafb760d21135f68 Change-Id: I2e0ae4908353833d81003b4f750af56ff3f8dbfb --- guix/build/mix-build-system.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/guix/build/mix-build-system.scm b/guix/build/mix-build-system.scm index 0b021da791..73af575b10 100644 --- a/guix/build/mix-build-system.scm +++ b/guix/build/mix-build-system.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2023 Pierre-Henry Fröhring ;;; Copyright © 2024 Igor Goryachev +;;; Copyright © 2024 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -92,7 +93,15 @@ (define* (set-mix-env #:key inputs mix-path mix-exs #:allow-other-keys) (setenv "MIX_EXS" mix-exs) (setenv "MIX_HOME" (getcwd)) (setenv "MIX_PATH" (or mix-path "")) - (setenv "MIX_REBAR3" (string-append (assoc-ref inputs "rebar3") "/bin/rebar3"))) + (setenv "MIX_REBAR3" (string-append (assoc-ref inputs "rebar3") "/bin/rebar3")) + ;; Add Erlang dependencies in Elixir's load path. + (setenv "ERL_LIBS" + (string-join (search-path-as-list + `("lib/erlang/lib") + (map (match-lambda + ((label . package) package)) + inputs)) + ":"))) (define* (set-elixir-version #:key inputs #:allow-other-keys) "Store the version number of the Elixir input in a parameter." base-commit: a1dc5ac832a106d46450961e78e7db3f83bf2bff -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 17:48:47 2024 Received: (at 73458) by debbugs.gnu.org; 25 Sep 2024 21:48:47 +0000 Received: from localhost ([127.0.0.1]:57996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stZsN-0004p3-6p for submit@debbugs.gnu.org; Wed, 25 Sep 2024 17:48:47 -0400 Received: from confino.investici.org ([93.190.126.19]:32825) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stZsI-0004om-CH for 73458@debbugs.gnu.org; Wed, 25 Sep 2024 17:48:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1727300384; bh=QWV9RRmEqDEYQknD9GgeQFY2VjPwzrxJZFvD4ZRJroA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qhwOTlBWO5qBq61mskVg4P0siFU3HBil50IglV8CdBsLJIir0wpRZE59og2SG9PGZ hc3zDLKmIaZ8otrxFo4+jQ934SQdK7iZ719nAK5qktiuJ2j+kLl/BCTEN6UdN1nz+E ghqn8sgBYsFe5yL6/m87n/M2ZeYjk01uGdJQ6PW8= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4XDVW44fhwz114x; Wed, 25 Sep 2024 21:39:44 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4XDVW43tqxz114j; Wed, 25 Sep 2024 21:39:44 +0000 (UTC) From: Giacomo Leidi To: 73458@debbugs.gnu.org Subject: [PATCH v2 2/2] build-system: mix: Fix decoding of package names with git versions. Date: Wed, 25 Sep 2024 23:39:18 +0200 Message-ID: <7d8ec46ff87e1c6d83f614404ea4be30c182109c.1727300358.git.goodoldpaul@autistici.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 73458 Cc: Giacomo Leidi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * guix/build/mix-build-system.scm (%git-version-rx): New variable, (package-name->elixir-name): use %git-version-rx to discriminate git versions from regular ones. Fixes Change-Id: Icc6dc56c3db62dfbc17c7c71354a7a7e3d2e5b2a Change-Id: I99ad5e36680928e50c0cba5beb85f34c7bfa12df --- guix/build/mix-build-system.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/guix/build/mix-build-system.scm b/guix/build/mix-build-system.scm index 73af575b10..6b7541cf56 100644 --- a/guix/build/mix-build-system.scm +++ b/guix/build/mix-build-system.scm @@ -40,6 +40,9 @@ (define-module (guix build mix-build-system) ;; minor version number of the Elixir used in the build. (define %elixir-version (make-parameter "X.Y")) +(define %git-version-rx + (make-regexp "^(.*)-[0-9]+(\\.[0-9]+)?(\\.[0-9]+)?-[0-9]+\\..+$")) + (define* (elixir-libdir path #:optional (version (%elixir-version))) "Return the path where all libraries under PATH for a specified Elixir VERSION are installed." @@ -133,10 +136,12 @@ (define* (remove-mix-dirs . _) (define (package-name->elixir-name name+ver) "Convert the Guix package NAME-VER to the corresponding Elixir name-version -format. Example: elixir-a-pkg-1.2.3 -> a_pkg" +format. Example: elixir-a-pkg-1.2.3 -> a_pkg or elixir-a-pkg-0.0.0-0.e51e36e +-> a_pkg" + (define git-version? (regexp-exec %git-version-rx name+ver)) ((compose (cute string-join <> "_") - (cute drop-right <> 1) + (cute drop-right <> (if git-version? 2 1)) (cute string-split <> #\-)) (strip-prefix name+ver))) -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 14:40:18 2024 Received: (at 73458-done) by debbugs.gnu.org; 12 Oct 2024 18:40:18 +0000 Received: from localhost ([127.0.0.1]:56661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szh2H-0002Vh-UU for submit@debbugs.gnu.org; Sat, 12 Oct 2024 14:40:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szh2A-0002Th-Qu for 73458-done@debbugs.gnu.org; Sat, 12 Oct 2024 14:40:11 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1szgHU-0002gF-Kg; Sat, 12 Oct 2024 13:51:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=WcyWucPPIi6Dto9/3ppQEizb8kRSfqcLPTepTndhsi0=; b=LuNeJS9mgPVScSKNM26b fL6Za2DjHg947MYWV6fByJLkgOWYvzcfB7srmgqung64uWhttYVmsmWdcDAuaKQYpu/YfYyaCDu6r el60vNahY0LkRNyQRBeXabMJ/aeRIyqURsjfEI9NWzTGFEkR+vetYzlj4QbtlZES/hHib2F5PFZba cTj+fxsEJM+V+LZ4ZMprgG/9Dwq2/Dlr/g/T5y8MHAd/T6rSb/qPKxchtVDaRqGhVZstAhJYLu+rd ZilDxW1gLZv0DNXCgrtHo5YwXnl/0cLWKWB1pS05lpnDMkpWvECaNUvLHAGAktQ7eotlwuXCJZ7P8 4IVqEpPTRpnXdg==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Giacomo Leidi Subject: Re: bug#73458: Fix mix-build-system bugs (73453 , 73454) In-Reply-To: (Giacomo Leidi's message of "Wed, 25 Sep 2024 23:39:17 +0200") References: Date: Sat, 12 Oct 2024 19:51:53 +0200 Message-ID: <878qutryyu.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73458-done Cc: 73458-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Giacomo Leidi skribis: > * guix/build/mix-build-system.scm (set-mix-env): sets ERL_LIBS to allow > Erlang's virtual machine to load Erlang dependencies in Mix builds. > > Fixes > Change-Id: Ic1ef5db20680bfd265fbac72bafb760d21135f68 [...] > * guix/build/mix-build-system.scm (%git-version-rx): New variable, > (package-name->elixir-name): use %git-version-rx to discriminate git > versions from regular ones. > > Fixes > Change-Id: Icc6dc56c3db62dfbc17c7c71354a7a7e3d2e5b2a Applied, thanks! Ludo'. From unknown Mon Aug 18 00:03:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 10 Nov 2024 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator