From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id GCgVHmgSAGcGWwAAqHPOHw:P1 (envelope-from ) for ; Fri, 04 Oct 2024 16:06:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id GCgVHmgSAGcGWwAAqHPOHw (envelope-from ) for ; Fri, 04 Oct 2024 18:06:00 +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=QSFnydMI; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=mD1T5OQu; dmarc=fail reason="SPF not aligned (relaxed), DKIM 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=1728057815; a=rsa-sha256; cv=none; b=te/wAphQJJG6voI7R2UfXTo/9RpyLPzFlpZ3iUgsMAiUGtp8HQOeRHYg2ujyrX9pQoJXoY 9rkZDp5W1Fhc709RXCjCUmp/VS/dUhF0gfmbpEmiGZiiC4VJLVi+dCHmLJpDPkKR9AF6AS C7tphLoHZmdOgWnBCdCEFJm3LnHdIP3I1BqrLOMS4gzz072vmMXoOuuVDP4ZJ5ncvNbKJh /mWxQN3FndEiwIwStOkIp2BqG8Ak3fsvNxL29gVu1cfD363kFJc7CYCGMn3u2lsjO780Ac 3vGVxih+s5mZev7dIltxMfMtTf7pgS9GC90yXh5t+o+Hg6LcDoDTX6xzOvNyJw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=QSFnydMI; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=mD1T5OQu; dmarc=fail reason="SPF not aligned (relaxed), DKIM 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1728057815; 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=tzkg8vk81MRTRUWSfwA1H5huGoSPu/bj4kiqA8+HHM0=; b=QdBxLbdZCPE1osUZc2fVTIMTB5QUa8+3RLN+ysCqO71Kkm4KN+zjfJ6jnrsR3CyuFDaaGf QdLiUJaWy1UJFVsWVdLnQ3VtaLoXT3O9BrdyPG/EWYaehOZJwFoq47jiwH0amYGi5R5tLH sY59vcLXs3YlPKlxe9hqDLZ99baFGCqHkI4ZOUlF0QnaPEA9L2/BpdYfv+Wg5WC4iR/Med fwIKhPhSN2sJvAQa1fTul2LAr3Mk2RCFmaQ+mWr0UkEZGfL8ZFjHlsDDZ+9Ko5nxO9XvlQ hx9UdybD/8I8ME11T8q+vzg2zeG+AjpBDi38ovk+LcWcBReh1GPomWjj4zC+1A== 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 41AB1609EB for ; Fri, 04 Oct 2024 18:03:35 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swkl0-0008Gq-Af; Fri, 04 Oct 2024 12:02:18 -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 1swkkh-00085d-5o for guix-patches@gnu.org; Fri, 04 Oct 2024 12:02:03 -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 1swkkg-0001Lg-SD for guix-patches@gnu.org; Fri, 04 Oct 2024 12:01:58 -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=tzkg8vk81MRTRUWSfwA1H5huGoSPu/bj4kiqA8+HHM0=; b=QSFnydMIJmw6284sqaIMYHeF0rHMoxcQhatuWH4+RnnKv7VjY7laaSuzOcQHMp3uthfESuVmlcgaqoZSNvakr13MzRZmAMuhXcSTZsjyOiWK4pQ79ijRWB3eb0PfO7uWy9kqyg2cYAMQwo/H+LFxQ5qR6WxIP8LBUz8n+3wmK41v9qz/SltVYH+Cw7V5XFl6yMjkeBE/gmwXldjEvHjYAeoRwd+auTND5zveAx2LUfMxYBoQHbgHu/OAqnQcc8fLomse2YMmuWALvVBe9jJsRx0vjDlSci1uoTRKQcJ49qTV1W6yOP7Uy4W95Dxn2aqs+/xEopC3GM6rXL1oGbaRUg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1swkkj-00062e-SO; Fri, 04 Oct 2024 12:02:01 -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: Fri, 04 Oct 2024 16:02:01 +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.172805770823201 (code B ref 72925); Fri, 04 Oct 2024 16:02:01 +0000 Received: (at 72925) by debbugs.gnu.org; 4 Oct 2024 16:01:48 +0000 Received: from localhost ([127.0.0.1]:36320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swkkV-000629-Ug for submit@debbugs.gnu.org; Fri, 04 Oct 2024 12:01:48 -0400 Received: from mail-pj1-f49.google.com ([209.85.216.49]:44164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swkkT-00061s-An for 72925@debbugs.gnu.org; Fri, 04 Oct 2024 12:01:46 -0400 Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-2e0b9bca173so1731999a91.0 for <72925@debbugs.gnu.org>; Fri, 04 Oct 2024 09:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728057636; x=1728662436; 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=tzkg8vk81MRTRUWSfwA1H5huGoSPu/bj4kiqA8+HHM0=; b=mD1T5OQuCWlYsjGOqSUtGPPzanmACmFxoc/hoa93NPmJXu4I6zwLwWVkrl3L7l3HmA 3hEIiMSAx/GzZ6cE3Z8+HSzkvRrapIxg9Viak3F7CGyhjWJKPoZTznYPkQUE5zlfK6qc 3MJUA9L4JEPYEMiasiI6yYuRreFyEtN21Hp07bLohOrMlEnKIBVzxO4qTlK/vXUVkeut hIhv7F0xGV3Ty2wM5X054GSJ1i3v8tPzMLMxfcqmUdIxe5RWuXd3U//bK3BE33nqxsJa +OLrZqD/nu0RGa5HZBeLImhSTlX9iFrLQQGlIv9ijZcKeS7Heb6ZOPp3WMwbMZjsFamo TjOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728057636; x=1728662436; 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=tzkg8vk81MRTRUWSfwA1H5huGoSPu/bj4kiqA8+HHM0=; b=j4l72bqK3+oI6OJD3U5FtGP7WigBayKtxX3/kl2ZpThT1wYf9ix49FQf/SRovF9FSc +v81XP/TReOcRZk/5sdmN14yyYbAzei/4oR5sdIRn98/6KQ0u5AY5eXVMCGl/mKkAIz5 y0M25vDUrsikuVkulI5gFndo/kOaOwru02O/XLm/7RI0UlO7uvRaI0eAMLsSuDo+Upn1 GXCZcRR1Aa0SHBNZMU+dfGklW/Iw6z0I2RU866NmUrZ+quZJYfHLDa3yrKbZCOKfO/B0 KaVN6DI37jSJaPSO7wh1NTaQBA41QSNUyTxfZ5SilDRbT7u9YMaWJEF6QCPHExRathoI 8dDg== X-Forwarded-Encrypted: i=1; AJvYcCWonrmRdv5awoMDVap7Or+79mKCIJCD3JjDVPqMQxHEckuXcLVj+WnJugzI8MgG91ifO2Okpw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyiyRaRKaU3akHHC44qxWw/EMk4Y7bllJY5C58xC6bEcZqJGuwX Bzh+XMWyJGTBVTA+Pac2EaLYLDlUL7jNcVrshn5t6ztTSF9OjoAied0C/tg5r1cGxCg1PomQ9ct v8XpPq3GTwwGCjauLcJbc22hXkFI= X-Google-Smtp-Source: AGHT+IH5DruoGEdwO+5YJfcPOrmRrtXqhriPFspLOFynynGWZ3jQEJ4akIlia9mCyMyifggRKTET+vUaVz9umrAaG9w= X-Received: by 2002:a17:90b:3806:b0:2e0:80e8:a31a with SMTP id 98e67ed59e1d1-2e1e636f5c3mr3168401a91.35.1728057635801; Fri, 04 Oct 2024 09:00:35 -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 19:00:23 +0300 Message-ID: Content-Type: multipart/alternative; boundary="0000000000008895b10623a8c547" 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: -0.44 X-Spam-Score: -0.44 X-Migadu-Queue-Id: 41AB1609EB X-Migadu-Scanner: mx12.migadu.com X-TUID: 1BXK6mYOVAwY --0000000000008895b10623a8c547 Content-Type: text/plain; charset="UTF-8" Hi Suhail, I just submitted a new path v8. I tested in a pure container shell and it worked for me for the following commands: - "jpm install -l sh" - "jpm install -l spork" - "jpm build" : for a basic hello world project Can you please have another look and let me know if you have any comments Thanks, *Omar* On Fri, 4 Oct 2024 at 01:04, Omar Bassam wrote: > 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 >>> >> --0000000000008895b10623a8c547 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Suhail,

I just submitted = a new path v8. I tested in a pure container shell and it worked for me for = the following commands:

- "jpm install -l sh&= quot;
- "jpm install -l spork"
- "jpm bu= ild" : for a basic hello world project

Can yo= u please have another look and let me know if you have any comments

Thanks,
Omar

On Fri, 4 Oct 2024= at 01:04, Omar Bassam <omar.= bassam88@gmail.com> wrote:
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 &= lt;omar.bassam= 88@gmail.com> wrote:
Hi Suhail,
I really need s= ome help here.
I am having trouble using gcc-toolchain becau= se 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 f= ine.
The issue that I'm having now is to include it in t= he lisp.scm file.
Can you tell what's the right use-modu= le form I need to use?

On Thu, 3 Oct 2024 at 16:40, Suhail Singh &= lt;suhailsing= h247@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
--0000000000008895b10623a8c547--