From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id mCiuIpYV/2aGKwEAqHPOHw:P1 (envelope-from ) for ; Thu, 03 Oct 2024 22:07:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id mCiuIpYV/2aGKwEAqHPOHw (envelope-from ) for ; Fri, 04 Oct 2024 00:07:18 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=ZeHUM214; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=Qj7gATJB; 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=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1727993238; 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=bOxF7+LD45PHc4mOVJgDLCiOMWlGfj5INYWg6Eb35O8=; b=rH9XREQkS/JElfNSkzxKLXxaXGd6cK8wTHynpjEnty8cGs2BnKwJwmZa/r7kESe0nG73e1 ge2d8vmzRdj2L2QisUjmMWI7oeoANpmN6HRkVYQiDJWMQYetMKrMn0g5FTzvFNdAKWrnAX aFBTsWlrx4SrwHTPIgkcu3FBSqlp/by7ikMp63647gACt8RB3d1aCxsbkz/d2KiJzuUY7G dqMa1vrvJU9FGM703hvUU5+9DLHaCnUcbhGByjoKT4Gheomy+InyNQ4A3lg/E5WVU4zp77 VLIlnhhy2opVoIAUEOAc7+o6Y84WnFi/ATjQvbbOg7PgqZrqBuliFRmFHrkUuw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727993238; a=rsa-sha256; cv=none; b=L4vzaiKvESphusnKGxnU00XD7FDfvnhLcd6U9C5f9zGza1PwGNCT/ebKWToSep/Yi82Vms PXQlar8ZwKWtclmCDQW2rjlh1ThbI8HrdcvYvTxE/jzvVy7eHDF8ZMlZGpBC6pIJj5XdzQ h/Ge5SfTk+IzWYuhvMMbXzVTUsWgfDvagQbCq8Iie1ucsEypECryM0RHzomhE6RnAyX5iH 5XX7KzLDIxmCUcXNabGtJJ/kLygtwuh9oM2m+Hl761IZOrBZ9BnJheMUgSee54lMQloWkW 0PYFJkwYNrYUmjs13HxfcyoO8syB+f/0EsJueunGmn79OhKAy+9yi6gmqyDBaw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=ZeHUM214; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=Qj7gATJB; 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=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) 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 1AE2F50FFB for ; Fri, 04 Oct 2024 00:07:18 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swTyQ-0000BT-1A; Thu, 03 Oct 2024 18:07:02 -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 1swTyO-0000BF-E0 for guix-patches@gnu.org; Thu, 03 Oct 2024 18:07:00 -0400 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 1swTyO-0007D2-58 for guix-patches@gnu.org; Thu, 03 Oct 2024 18:07:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=bOxF7+LD45PHc4mOVJgDLCiOMWlGfj5INYWg6Eb35O8=; b=ZeHUM214h7GOM1x3UHMZBUXby06L6L4IitdBmeg20FaotKpG5AXd79dOZwfOh9b8rqONGeZWhOmyWGxhik1MGqd51UCvHSi6TDUT8/de4pG6S8z5SKaY84YAuq5tTp43ktAq3l7I3olmKL4ZDHrtWyu289gJd9Foj2kNyPbfFryFEVqpCVq8E9fNQruocbsJSP6Mr7LMp7KVu+cHtZknPJL62ROclB54NMozud/qKD2JEFAuSINb9U3dyfkp77H/w0GveUZpiu7Bu2AqMWAA1qPSvFQL+vkhU36/STVeQToMWsglxu7+ddMcr5ilZ2SyRaRRcOlWM7FcnXb4K2xwuw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1swTyQ-0006wS-8U; Thu, 03 Oct 2024 18:07:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72925] Adding JPM package for Janet Resent-From: Omar Bassam Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org, "Suhail Singh" Resent-Date: Thu, 03 Oct 2024 22:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72925 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Suhail Singh Cc: Sharlatan Hellseher , 72925@debbugs.gnu.org, Guillaume Le Vaillant , Katherine Cox-Buday , Munyoki Kilyungi , jgart Received: via spool by 72925-submit@debbugs.gnu.org id=B72925.172799317826613 (code B ref 72925); Thu, 03 Oct 2024 22:07:02 +0000 Received: (at 72925) by debbugs.gnu.org; 3 Oct 2024 22:06:18 +0000 Received: from localhost ([127.0.0.1]:34046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swTxh-0006vA-M9 for submit@debbugs.gnu.org; Thu, 03 Oct 2024 18:06:18 -0400 Received: from mail-pg1-f174.google.com ([209.85.215.174]:45171) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swTxf-0006ut-Ld for 72925@debbugs.gnu.org; Thu, 03 Oct 2024 18:06:16 -0400 Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-7e6bb2aa758so649685a12.2 for <72925@debbugs.gnu.org>; Thu, 03 Oct 2024 15:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727993107; x=1728597907; 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=bOxF7+LD45PHc4mOVJgDLCiOMWlGfj5INYWg6Eb35O8=; b=Qj7gATJBa726KH9OqxLRxuW7jMvwsC5Lz0vQasYF+sI74b2L+2fC04wqzgNGo2rCuk v13WR3X4VR+ORQvvOmBIlPjAZyXi+tsVGuu/zWKRRydvSFME3afOnz5HasjnNif/WppA 3x6f0Zre59oFGdqeRaDpWxe5YXbLVpoojmxYmTzCI41J2IV7e0IcubqJcp8D4qi8M0vK q5InQC6zowBcxBWGBDFBDsC2wazN4BaTdrWA/PwwnqVyNnz1oJKrSlkvOMW/L13NYSHD VEEx5wSLDXrHrOTL2oIFurT1OeNzrdYM8D8T0xg8R7HrJTiBzaEbWB9hNUoxqlOKi8yz F3GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727993107; x=1728597907; 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=bOxF7+LD45PHc4mOVJgDLCiOMWlGfj5INYWg6Eb35O8=; b=BW6RSySrygJKebDdzBoAsgqa+Bb4CSaQAVC4d/kfRg/2INekQlLxbQ6u8UIZU63xA7 TsSouWMjpehc0dj62/NYBE5B+rYb20d9j94pgx1abkvizSvcaR2kltwdQZYz3e3crXn9 CgCi87iU/oXr0g/L20sD9PrvxYIm00kakpdOqcNAMJw5zy3HPrrtenWmFWVdSbLcqC+u OYuCZLt3mSmybL2yKzcQ8xkJO8GaxpLiq5L2X6igSKXK7fC2MUfgkHGbxdGijXiIVglM +DHnsKOyukYae1QWWdXydDISPVsVUn02kjj822n95xfqRogU11CaYK/o2aOnAKA40w1J szKg== X-Forwarded-Encrypted: i=1; AJvYcCXrbSaR6T0qf9WcjH2rjE6UyzVqY+DC8mufavwkI6vDVhQ95g7L++LR2WP2Xtm1pVPVFUru9A==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yxnpm07U/LmkRyEHdHHJL0bcTBbBszInWvqAp/xISkjuYvtMzK4 r9ZBRCPbso3zmRQN339QW7bpFqhRHU677i8ZuWi8y1n7sfAB2ObL7X2t+MJFd/r7l+hynB5yBg+ /0zKNfS5DNGOyDjRqRhZJiaX3pw8= X-Google-Smtp-Source: AGHT+IHZegmUcZ1cY2qiHHK2g+koT6Vjg+swAa/BsMCwc7yrfAoCLAURWy2gbSSVHwL3Alsgqmzjkr7nEmPwkLMXu/4= X-Received: by 2002:a17:90a:640b:b0:2dd:5e86:8c2f with SMTP id 98e67ed59e1d1-2e1e626c37emr589554a91.21.1727993107303; Thu, 03 Oct 2024 15:05:07 -0700 (PDT) MIME-Version: 1.0 References: <4e623d9571ff648ae1d1c6ffb8f9d73c421a5c10.1727683810.git.omar.bassam88@gmail.com> <87plok7kkn.fsf@gmail.com> <8734lev012.fsf@gmail.com> <875xqanty2.fsf@gmail.com> <87cyki9obi.fsf@gmail.com> <878qv69n0o.fsf@gmail.com> <874j5u7yme.fsf@gmail.com> <87jzep2tlb.fsf_-_@gmail.com> In-Reply-To: From: Omar Bassam Date: Fri, 4 Oct 2024 01:04:55 +0300 Message-ID: Content-Type: multipart/alternative; boundary="00000000000055d65c062399bfe7" 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: 1.13 X-Spam-Score: 1.13 X-Migadu-Queue-Id: 1AE2F50FFB X-Migadu-Scanner: mx13.migadu.com X-TUID: cWIA6yqpeQo8 --00000000000055d65c062399bfe7 Content-Type: text/plain; charset="UTF-8" It's OK I figured it out now. I'll be posting the patch soon. On Thu, 3 Oct 2024 at 22:45, Omar Bassam wrote: > Hi Suhail, > I really need some help here. > I am having trouble using gcc-toolchain because when I add the (gnu > packages commencement) modules to the lisp.scm file I get a lot of errors > that I don't understand. > I was able to create a local manifest file with the definition of my > package and made the substitutions you suggested and added the propagated > input and it worked fine. > The issue that I'm having now is to include it in the lisp.scm file. > Can you tell what's the right use-module form I need to use? > > On Thu, 3 Oct 2024 at 16:40, Suhail Singh > wrote: > >> Omar Bassam writes: >> >> > I just have some questions before submitting v8 if you don't mind. just >> to >> > make sure I understand correctly. >> >> Questions are always welcome :) >> >> >> Specifically, in the file "configs/linux_config.janet", among other >> >> things, the below are set >> >> >> >> #+begin_src janet >> >> :c++ "c++" >> >> :c++-link "c++" >> >> :cc "cc" >> >> :cc-link "cc" >> >> #+end_src >> >> >> >> Since Guix, as far as I know, doesn't have packages that provide c++ >> nor >> >> cc, I believe the above need to be patched to refer to gcc and g++ >> >> respectively. >> >> >> >> So we need to substitute the above "c++" and "cc" in the >> > "configs/linux_config.janet" to point to the absolute path for the gcc >> and >> > g++ packages? >> >> I believe there are multiple ways to make this work. I haven't tested >> this, so take my opinions as speculative. >> >> If we replace "cc" and "c++" with the _absolute path_ for "gcc" and >> "g++" respectively from the Guix store, then I don't think we need to >> specify gcc-toolchain as a propagated input. Upon reflecting on this, >> this is probably the better approach. >> >> If, however, we replace "cc" and "c++" with the _strings_ "gcc" and >> "g++", then I believe we may need to specify gcc-toolchain in the >> propagated inputs. IIUC, in this case we would replace the command that >> JPM invokes when building. By additionally having gcc-toolchain in the >> propagated inputs we'll ensure that they're available in the PATH. >> >> > Should we also replace other commands that are hard-coded like "cp" and >> > "chown" from coreutils the same way I did in my first initial patch? >> >> I don't believe this is necessary. There's a question regd. whether or >> not coreutils needs to be added to the propagated inputs, however. I >> don't have a definitive answer, but the way to test it would be to run >> it in a pure container and see if things work without having to >> explicitly specify coreutils. If you're unable to test it, let me know >> when you send v8 and I can test it on your behalf. >> >> For reference, I use something like the below: >> #+begin_src sh >> guix shell --pure -CPWN \ >> -E '.*GTK.*|.*XDG.*|.*DISPLAY.*|TERM|INSIDE_EMACS' \ >> -p /path/to/profile >> #+end_src >> >> > Further, I believe JPM should have a few propagated inputs: >> >> - gcc-toolchain >> >> - curl >> >> - git >> >> - nss-certs. >> >> >> >> I understand why we need gcc-toolchain. But why do we need curl, git >> and >> > nss-certs? >> >> linux_config.janet also specifies: >> >> #+begin_src janet >> ... >> :curlpath "curl" >> ... >> :gitpath "git" >> ... >> #+end_src >> >> Whether Guix packaging picks these up automatically or not, I haven't >> tested, but it seems for common usage of JPM these dependencies ought to >> be available. Similar to the case of "gcc" and "g++", it might be >> better to replace these with references to the respective binaries in >> the Guix store instead (as opposed to propagating them as I had >> previously suggested). >> >> Regarding nss-certs, it provides certificates for Certification >> Authorities which, IIUC, would be relevant for HTTPS URLs (e.g. fetching >> dependencies over git+https). >> >> To summarize, here's what I believe is needed. Add nss-certs to the >> propagated inputs, and for the below replace their occurrence in >> linux_config.janet with references to binaries in the store: >> - cc -> absolute path of gcc >> - c++ -> absolute path of g++ >> - curl -> absolute path of curl >> - git -> absolute path of git >> >> -- >> Suhail >> > --00000000000055d65c062399bfe7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It's OK I figured it out now. I'll be posting the = patch soon.

On Thu, 3 Oct 2024 at 22:45, Omar Bassam <omar.bassam88@gmail.com> wrote:
H= i Suhail,
I really need some help here.
I am = having trouble using gcc-toolchain because when I add the (gnu packages com= mencement) modules to the lisp.scm file I get a lot of errors that I don= 9;t understand.
I was able to create a local manifest file with t= he definition of my package and made the substitutions you suggested and ad= ded the propagated input and it worked fine.
The issue that = I'm having now is to include it in the lisp.scm file.
Ca= n you tell what's the right use-module form I need to use?

On = Thu, 3 Oct 2024 at 16:40, Suhail Singh <suhailsingh247@gmail.com> wrote:
Omar Bassam <omar.bassam88@gmail= .com> writes:

> I just have some questions before submitting v8 if you don't mind.= just to
> make sure I understand correctly.

Questions are always welcome :)

>> Specifically, in the file "configs/linux_config.janet", = among other
>> things, the below are set
>>
>> #+begin_src janet
>>=C2=A0 =C2=A0 :c++ "c++"
>>=C2=A0 =C2=A0 :c++-link "c++"
>>=C2=A0 =C2=A0 :cc "cc"
>>=C2=A0 =C2=A0 :cc-link "cc"
>> #+end_src
>>
>> Since Guix, as far as I know, doesn't have packages that provi= de c++ nor
>> cc, I believe the above need to be patched to refer to gcc and g++=
>> respectively.
>>
>> So we need to substitute the above "c++" and "cc&qu= ot; in the
> "configs/linux_config.janet" to point to the absolute path f= or the gcc and
> g++ packages?

I believe there are multiple ways to make this work.=C2=A0 I haven't te= sted
this, so take my opinions as speculative.

If we replace "cc" and "c++" with the _absolute path_ f= or "gcc" and
"g++" respectively from the Guix store, then I don't think we= need to
specify gcc-toolchain as a propagated input.=C2=A0 Upon reflecting on this,=
this is probably the better approach.

If, however, we replace "cc" and "c++" with the _string= s_ "gcc" and
"g++", then I believe we may need to specify gcc-toolchain in the=
propagated inputs.=C2=A0 IIUC, in this case we would replace the command th= at
JPM invokes when building.=C2=A0 By additionally having gcc-toolchain in th= e
propagated inputs we'll ensure that they're available in the PATH.<= br>
> Should we also replace other commands that are hard-coded like "c= p" and
> "chown" from coreutils the same way I did in my first initia= l patch?

I don't believe this is necessary.=C2=A0 There's a question regd. w= hether or
not coreutils needs to be added to the propagated inputs, however.=C2=A0 I<= br> don't have a definitive answer, but the way to test it would be to run<= br> it in a pure container and see if things work without having to
explicitly specify coreutils.=C2=A0 If you're unable to test it, let me= know
when you send v8 and I can test it on your behalf.

For reference, I use something like the below:
#+begin_src sh
=C2=A0 guix shell --pure -CPWN \
=C2=A0 =C2=A0 -E '.*GTK.*|.*XDG.*|.*DISPLAY.*|TERM|INSIDE_EMACS' \<= br> =C2=A0 =C2=A0 -p /path/to/profile
#+end_src

> Further, I believe JPM should have a few propagated inputs:
>> - gcc-toolchain
>> - curl
>> - git
>> - nss-certs.
>>
>> I understand why we need gcc-toolchain. But why do we need curl, g= it and
> nss-certs?

linux_config.janet also specifies:

#+begin_src janet
=C2=A0 =C2=A0...
=C2=A0 =C2=A0:curlpath "curl"
=C2=A0 =C2=A0...
=C2=A0 =C2=A0:gitpath "git"
=C2=A0 =C2=A0...
#+end_src

Whether Guix packaging picks these up automatically or not, I haven't tested, but it seems for common usage of JPM these dependencies ought to be available.=C2=A0 Similar to the case of "gcc" and "g++&qu= ot;, it might be
better to replace these with references to the respective binaries in
the Guix store instead (as opposed to propagating them as I had
previously suggested).

Regarding nss-certs, it provides certificates for Certification
Authorities which, IIUC, would be relevant for HTTPS URLs (e.g. fetching dependencies over git+https).

To summarize, here's what I believe is needed.=C2=A0 Add nss-certs to t= he
propagated inputs, and for the below replace their occurrence in
linux_config.janet with references to binaries in the store:
- cc -> absolute path of gcc
- c++ -> absolute path of g++
- curl -> absolute path of curl
- git -> absolute path of git

--
Suhail
--00000000000055d65c062399bfe7--