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 eISBCcD0/mZyuAAAqHPOHw:P1 (envelope-from ) for ; Thu, 03 Oct 2024 19:47:12 +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 eISBCcD0/mZyuAAAqHPOHw (envelope-from ) for ; Thu, 03 Oct 2024 21:47:12 +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=LWsXl3jY; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=BZJgPP0b; 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=1727984832; 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=7JQFuz6AeFnNqJucfFD2wDAQI3Kio1Sbt5xNkVDGspc=; b=o7POmeUrQBPURYWMZRMKhxQ1czrXZgfPtO/WVvJVLtz/Rpthwwh7DBVRBMfKLtebbIGB2T LfiQ3ASQ+TlPA7vYfwnX3SK2BUO4ZAjZSyDcj025yrc1J4tt4+fAoOjvlZiUCf+fKLYJmX AKtG95QNjsgowoBJEcM5BghnI9ttailbTPExyZ04TnFlpkHFglN4epDjohwczgn07rNRf7 toO8UvcRHR3w/xN3fAo4bs9M6vxQcp8/FHU3Ml4UBYuQL34JZ7CoPQKE5IUjnZ2j9CQ8rb xMYhCh4pOsZivfdhzunPq4jweiON7Rr6jDWbihW7IeCRS2jo7sN5zUXjE4o50g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727984832; a=rsa-sha256; cv=none; b=RhYXlyq06+NvnYcaTsmsm69pjAucYnz0sOWDGAb0Jy10HxmvwBBffotswNDOTn08y1LV+6 vzAmIb0MmbFqMhCuk/aQc49L3KLniBJGtz3P4m90gDaFnrViBojr+CnXDtlpHsr/ahL9Sk 3DpBgDWUReccLuCd0Wcz5RmRp6nyYt/Aq1YBPdPodo1tzxA2v/CYSodisuzCtIQMHx9C7O KyVatnC607TIxRYTXip9Idcf3nCRVIiYbkxCXqZPeIkAmSaA6XK2LKEASWorpNjuyOWNAO qOOLcpvrUZf8wKwxG0mzYSCLQ8uLUBkpL73uhJ1sjaaLCBuXIwT/s3tBiE5IBQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=LWsXl3jY; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=BZJgPP0b; 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 7D5B547D9 for ; Thu, 03 Oct 2024 21:47:11 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swRmv-0002Sh-3Q; Thu, 03 Oct 2024 15:47:01 -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 1swRmu-0002SH-6R for guix-patches@gnu.org; Thu, 03 Oct 2024 15:47: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 1swRmt-0005p3-UF for guix-patches@gnu.org; Thu, 03 Oct 2024 15:46:59 -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=7JQFuz6AeFnNqJucfFD2wDAQI3Kio1Sbt5xNkVDGspc=; b=LWsXl3jYn49Liy0Y11+ZRKauvHamr/vLYUu+vPCkIC+42/t43RsorqhBfQaCvunJjJ84+KconKU1AttrR30vlDFGGjAa4xD/AjwAXVWcpLJEizbH4u84Bb7WYdDvfJlHeCv0Z24GG50Lbay3+K2gGYfqLf48I/SciNd8hFIFuhZEcCgPXochCZuCBpllphjyUnwmeCNq1qjJN3TPpkkLangDFIynbjlvI6M3S2jO+uXT1J9gePVDhf7Fy8f+KjNGTn1TOBMGaJ7ZIMsjMizPKA2ZjqAgxmk06GugPmdC5nqZ5G6PVV9+H/DAPWh0d+BNIRcbzF3AwSttCDXBNJjbCg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1swRmw-0007sT-31; Thu, 03 Oct 2024 15:47: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 19:47: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.172798478630224 (code B ref 72925); Thu, 03 Oct 2024 19:47:02 +0000 Received: (at 72925) by debbugs.gnu.org; 3 Oct 2024 19:46:26 +0000 Received: from localhost ([127.0.0.1]:33915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swRmM-0007rQ-0d for submit@debbugs.gnu.org; Thu, 03 Oct 2024 15:46:26 -0400 Received: from mail-pl1-f177.google.com ([209.85.214.177]:56669) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swRmJ-0007qs-RR for 72925@debbugs.gnu.org; Thu, 03 Oct 2024 15:46:24 -0400 Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-20b86298710so11668005ad.1 for <72925@debbugs.gnu.org>; Thu, 03 Oct 2024 12:46:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727984715; x=1728589515; 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=7JQFuz6AeFnNqJucfFD2wDAQI3Kio1Sbt5xNkVDGspc=; b=BZJgPP0bilEPct/mvJJ7O4ujD8jIj3Q9BsiJHfonkAB59mLCMflnVN7AHL27U3xE17 OHyXGJa+eIJDTSR25HTOl5aUjTi75xjH+gvTXqLXEDEHZVT/XAkUegyPdcrHTpSyWwNp EN3Q3rD9YxOkLSNH1bctpKA0IrG84QHMfYynBTU2d82XI7Cz3Vf00Ruh+zI1yeu6cziU q/KxaTxOLWzJi3whI/OxYITiyhy8zKVAwlGOcdMZ0roL+GhenAV0nkHHPwr521njZ/xY EzuAMwKtk2QAi/aZjg07jChzU/JgA28GS/XZ1sZTogqJTsShg+KHttwsB8bSNl+CCSw5 y+hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727984715; x=1728589515; 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=7JQFuz6AeFnNqJucfFD2wDAQI3Kio1Sbt5xNkVDGspc=; b=gy+7wo9ti0/K9xNPpBLZ+RGDqV3RRBgA8d7HJksK0SFMuty7ypr1ATt3b185uv4Tcd KmpVf/y3LiqDKTJmyNWDNhyD0RlG6NDytATknKFT4fPgslk1e3f39Yiyr3OStGTR/+1M NRT2IZggKdKmzjWhkW+lLa5hqE2eudP2FeaDhm1Jo2wSl4qRglxWk7yxFxZOqgxxfB1O t/DJuKT9YYchCbXGxhZBTzofvwmIccCo5Rnj2e0Lan7EeJN8jus35Z/RrDwKxOzSxWpv qOkCRkU0TtcZK6nFFIRIq6HYWwloktvEwlxphQkD/1tBi8merMAKhyb6Rrn6tyzP8d/H YWcw== X-Forwarded-Encrypted: i=1; AJvYcCUcv2J2Sf8wSZ1pmLIjRVyT17hVzlgzBYy3+5UTYmjF6E76z1YiUHp8e8ri1JsAnPhy8ZcEbQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwP9E+fwOpmXNHS9vBn2h1cL9X4rO81egru/Nq+/F3bVxFw4Z0m GzAFnEmIbBUIAT0EKmEgvqRUfxDt1r6gLgPLrWw/BildjgcqDENdTGvBeafXGfbxo/avLjlL0// 8/sZwDxF57MPwfK2hBGkTFTUia4Q= X-Google-Smtp-Source: AGHT+IG6tkQfHKETQDQmvZAEXvLJzH/x2VRbJvdb9APDgHIGLmfTevkwPwiVM70TO0EaoRQHFvK561YPaUYQW+24DX0= X-Received: by 2002:a17:903:41c2:b0:20b:c1e4:2d5d with SMTP id d9443c01a7336-20bfe494d53mr3589385ad.34.1727984715433; Thu, 03 Oct 2024 12:45:15 -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: <87jzep2tlb.fsf_-_@gmail.com> From: Omar Bassam Date: Thu, 3 Oct 2024 22:45:03 +0300 Message-ID: Content-Type: multipart/alternative; boundary="000000000000240c26062397cb3a" 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: 7D5B547D9 X-Migadu-Scanner: mx13.migadu.com X-TUID: DuMhoD2e7Uc1 --000000000000240c26062397cb3a Content-Type: text/plain; charset="UTF-8" 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 > --000000000000240c26062397cb3a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Suhail,
I really need some help her= e.
I am having trouble using gcc-toolchain because when I ad= d 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 loc= al manifest file with the definition of my package and made the substitutio= ns 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 ne= ed to use?

On Thu, 3 Oct 2024 at 16:40, Suhail Singh <suhailsingh247@gmail.com> wrote= :
Omar Bassam &l= t;omar.bassam8= 8@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
--000000000000240c26062397cb3a--