From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:57400) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htquO-0004Yf-11 for guix-patches@gnu.org; Sat, 03 Aug 2019 06:05:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htquM-000079-N5 for guix-patches@gnu.org; Sat, 03 Aug 2019 06:05:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49485) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1htquM-000073-Af for guix-patches@gnu.org; Sat, 03 Aug 2019 06:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1htquM-00038y-4X for guix-patches@gnu.org; Sat, 03 Aug 2019 06:05:02 -0400 Subject: [bug#36856] build: Add julia-build-system Resent-Message-ID: MIME-Version: 1.0 References: <87sgqn629k.fsf@elephly.net> <1DBAF4CE-8BA5-43EF-9CFE-5A73FB8118EB@lepiller.eu> <87o91b619c.fsf@elephly.net> In-Reply-To: From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Date: Sat, 3 Aug 2019 10:03:47 +0000 Message-ID: Content-Type: multipart/alternative; boundary="00000000000001c41c058f3398fd" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ricardo Wurmus Cc: 36856@debbugs.gnu.org --00000000000001c41c058f3398fd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, I'm back. I fixed the problem I had (I forgot the ./pre-inst-env -.-") Following this discussion, I'm adding ``native-search-paths'' to the julia package. Now, without any other hack (like the setup.jl one), it can find the packages but only when installed with guix package -i . It cannot find them when in an environment (guix environment --ad-hoc julia-package). Can you help? Except from this, I cleaned everything a bit, and added a draft of the documentation. I'm attaching the new patches here (without the julia-xyz part one, to which I'll add all package synopsis and description, and I'll split in multiple patches before re-submitting). Thanks, Nicol=C3=B2 Il giorno mar 30 lug 2019 alle ore 16:02 Nicol=C3=B2 Balzarotti < anothersms@gmail.com> ha scritto: > Thanks for the quick response! > > Well, the environment variable JULIA_LOAD_PATH (that inside julia is just > LOAD_PATH) works exactly like that (is a column-concatenated path list). = It > just needs the special ":@stdlib" path to let julia find its standard > libraries. > Example: > > JULIA_LOAD_PATH=3D/my/new/path/:/profile/path/:@stdlib julia --startup= =3Dno > -E 'LOAD_PATH' > ["/my/new/path/", "/profile/path/", "@stdlib"] > > Is setting this variable from guix fine, or we need a special > GUIX_SOMETHING variable? > Where exactly should I set this? > > Thanks > > Il giorno mar 30 lug 2019 alle ore 14:33 Ricardo Wurmus < > rekado@elephly.net> ha scritto: > >> >> Julien Lepiller writes: >> >> > Le 30 juillet 2019 16:11:19 GMT+02:00, Ricardo Wurmus < >> rekado@elephly.net> a =C3=A9crit : >> >> >> >>Nicol=C3=B2 Balzarotti writes: >> >> >> >>> 3. By adding a simple startup.jl script, inspired by what emacs does= . >> >>This >> >>> is simplified so I'm not sure it works for every corner case. >> >>> #+begin_src julia >> >>> let paths =3D [expanduser("~/.guix-profile"), >> >>"/run/current-system/profile"] >> >>> ("GUIX_ENVIRONMENT" in keys(ENV)) && push!(paths, >> >>> ENV["GUIX_ENVIRONMENT"]) >> >>> empty!(LOAD_PATH) >> >>> push!.(Ref(LOAD_PATH), joinpath.(paths, "share/julia/packages/")= ) >> >>> push!(LOAD_PATH, "@stdlib") >> >>> push!.(Ref(DEPOT_PATH), joinpath.(paths, "share/julia/")) >> >>> nothing >> >>> end >> >>> #+end_src >> >> >> >>Could this perhaps be handled by a profile hook that is included only >> >>when the profile manifest contains a julia package? >> > >> > Or simply with an environment variable? GUIX_JULIA_PATH or something? >> >> If this is the route you go down, please ensure that it can be used as a >> search path with more than one directory. This would make it possible >> to extend a Julia environment with the contents of more than one >> profile. >> >> -- >> Ricardo >> >> --00000000000001c41c058f3398fd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, I'm back.

I fixed th= e problem I had (I forgot the ./pre-inst-env -.-")

=
Following this discussion, I'm adding ``native-search-paths&= #39;' to the julia package. Now, without any other hack (like the setup= .jl one), it can find the packages but only when installed with guix packag= e -i . It cannot find them when in an environment (guix environment --ad-ho= c julia-package).
Can you help?

Exc= ept from this, I cleaned everything a bit, and added a draft of the documen= tation. I'm attaching the new patches here (without the julia-xyz part = one, to which I'll add all package synopsis and description, and I'= ll split in multiple patches before re-submitting).

Thanks, Nicol=C3=B2

Il giorno mar 30 lug 2019 alle ore 16:02 Nic= ol=C3=B2 Balzarotti <anothersms@= gmail.com> ha scritto:
Thanks for the quick response!

Well, the environment variable JULIA_LOAD_PATH (that insid= e julia is just LOAD_PATH) works exactly like that (is a column-concatenate= d path list). It just needs the special ":@stdlib" path to let ju= lia find its standard libraries.
Example:
> JULIA_LO= AD_PATH=3D/my/new/path/:/profile/path/:@stdlib julia --startup=3Dno -E '= ;LOAD_PATH'
["/my/new/path/", "/profile/path/", = "@stdlib"]

Is setting this variable = from guix fine, or we need a special GUIX_SOMETHING variable?
Whe= re exactly should I set this?

Thanks

Il g= iorno mar 30 lug 2019 alle ore 14:33 Ricardo Wurmus <rekado@elephly.net> ha scritto:=

Julien Lepiller <julien@lepiller.eu> writes:

> Le 30 juillet 2019 16:11:19 GMT+02:00, Ricardo Wurmus <rekado@elephly.net> a = =C3=A9crit :
>>
>>Nicol=C3=B2 Balzarotti <anothersms@gmail.com> writes:
>>
>>> 3. By adding a simple startup.jl script, inspired by what emac= s does.
>>This
>>> is simplified so I'm not sure it works for every corner ca= se.
>>> #+begin_src julia
>>> let paths =3D [expanduser("~/.guix-profile"),
>>"/run/current-system/profile"]
>>>=C2=A0 =C2=A0 =C2=A0("GUIX_ENVIRONMENT" in keys(ENV))= && push!(paths,
>>> ENV["GUIX_ENVIRONMENT"])
>>>=C2=A0 =C2=A0 =C2=A0empty!(LOAD_PATH)
>>>=C2=A0 =C2=A0 =C2=A0push!.(Ref(LOAD_PATH), joinpath.(paths, &qu= ot;share/julia/packages/"))
>>>=C2=A0 =C2=A0 =C2=A0push!(LOAD_PATH, "@stdlib")
>>>=C2=A0 =C2=A0 =C2=A0push!.(Ref(DEPOT_PATH), joinpath.(paths, &q= uot;share/julia/"))
>>>=C2=A0 =C2=A0 =C2=A0nothing
>>> end
>>> #+end_src
>>
>>Could this perhaps be handled by a profile hook that is included on= ly
>>when the profile manifest contains a julia package?
>
> Or simply with an environment variable? GUIX_JULIA_PATH or something?<= br>
If this is the route you go down, please ensure that it can be used as a search path with more than one directory.=C2=A0 This would make it possible=
to extend a Julia environment with the contents of more than one
profile.

--
Ricardo

--00000000000001c41c058f3398fd--