GNU bug report logs - #36856
build: Add julia-build-system

Previous Next

Package: guix-patches;

Reported by: Nicolò Balzarotti <anothersms <at> gmail.com>

Date: Tue, 30 Jul 2019 12:51:01 UTC

Severity: normal

Done: Julien Lepiller <julien <at> lepiller.eu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36856 in the body.
You can then email your comments to 36856 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#36856; Package guix-patches. (Tue, 30 Jul 2019 12:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolò Balzarotti <anothersms <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 30 Jul 2019 12:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolò Balzarotti <anothersms <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: build: Add julia-build-system
Date: Tue, 30 Jul 2019 12:49:43 +0000
[Message part 1 (text/plain, inline)]
Hello people! :)

Lately I've been working a bit on julia packages support in guix.

The good news first: I've been able to install dozen of them, including
those depending on binaryprovider with simple workarounds.
1. By writing manually the deps.jl file (the one that saves the path of
dynamic libraries in a julia const)
2. By "manually" writing required Package.toml files for old packages that
are not using it yet (else julia cannot find them)
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 = [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

With those, I've been able to install the following (with their
dependencies):
- Plots.jl (GR.jl backend)
- HTTP.jl
- Gtk.jl
- Gumbo.jl/Cascadia.jl
- FileIO.jl
- CSVFiles.jl ;; TODO: Fix warnings
- JSON.jl
- JSON2.jl
- MsgPack.jl
- DataFrames.jl
- Query.jl
- SQLite.jl
- Interact.jl

There is a phase called 'precompile' even if I could not get julia actually
use the precompiled packages. This is similar to what emacs does (.el ->
.elc). Even if currently this cache is not used, is useful to have this
phase to verify that package import works.

Now the bad news: this patch is really big (mostly because I wanted to be
sure that in principle installing every package is possible. Before
splitting the second patch into multiple small ones, I wanted to be sure
that what I'm doing is somewhat correct.

Also, even if I was able to install those by using a separate folder (with
guix environment -L .), I'm getting this error now, and I don't know what
is causing it (since I'm not touching those files):

#+begin_example
   626:19  2 (_ #<directory (gnu packages gnuzilla) 805fd20>)
   293:34  1 (_ #(#(#(#(#(#(#(#(#(#(#(#(#<directory (gnu packages gnuzilla)
805fd20> "60.8.0") "60") "8") "0") "60.8.0esr") #<origin "
https://ftp.mozilla.org/pub/firefox/releas?>) #) #) #) #) #) #))
    159:9  0 (_ #(#(#(#(#(#(#(#(#(#(#(#(#<directory (gnu packages gnuzilla)
805fd20> "60.8.0") "60") "8") "0") "60.8.0esr") #<origin "
https://ftp.mozilla.org/pub/firefox/releas?>) #) #) #) #) #) #))

ice-9/eval.scm:159:9: Throw to key `srfi-34' with args `(#<condition
&message [message: "icecat-makeicecat.patch: patch not found"] 8eeae0>)'.
#+end_example

I hope somebody is willed to help getting this in a good state :)
Thanks, Nicolò!
[Message part 2 (text/html, inline)]
[0001-build-Add-julia-build-system.patch (text/x-patch, attachment)]
[0002-add-many-julia-packages.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#36856; Package guix-patches. (Tue, 30 Jul 2019 14:10:02 GMT) Full text and rfc822 format available.

Message #8 received at 36856 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Nicolò Balzarotti <anothersms <at> gmail.com>
Cc: 36856 <at> debbugs.gnu.org
Subject: Re: [bug#36856] build: Add julia-build-system
Date: Tue, 30 Jul 2019 16:08:55 +0200
Hi Nicolò,

> Lately I've been working a bit on julia packages support in guix.
>
> The good news first: I've been able to install dozen of them, including
> those depending on binaryprovider with simple workarounds.

Excellent!

> 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 = [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

This looks like it would not work with profiles installed anywhere else.
I’m not a fan of hard-coding ~/.guix-profile, because I know that many
people here at the institute use per-project profiles at custom
location.  Any mechanism that relies on things to be installed to
~/.guix-profile will fail them.

Could this be made profile-agnostic?  Perhaps the GUIX_PROFILE
environment variable could be referenced?

Thanks for working on it!

--
Ricardo





Information forwarded to guix-patches <at> gnu.org:
bug#36856; Package guix-patches. (Tue, 30 Jul 2019 14:12:02 GMT) Full text and rfc822 format available.

Message #11 received at 36856 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: anothersms <at> gmail.com
Cc: 36856 <at> debbugs.gnu.org
Subject: Re: [bug#36856] build: Add julia-build-system
Date: Tue, 30 Jul 2019 16:11:19 +0200
Nicolò Balzarotti <anothersms <at> gmail.com> 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 = [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?

-- 
Ricardo





Information forwarded to guix-patches <at> gnu.org:
bug#36856; Package guix-patches. (Tue, 30 Jul 2019 14:25:01 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: guix-patches <at> gnu.org, Ricardo Wurmus <rekado <at> elephly.net>,
 anothersms <at> gmail.com
Cc: 36856 <at> debbugs.gnu.org
Subject: Re: [bug#36856] build: Add julia-build-system
Date: Tue, 30 Jul 2019 16:23:47 +0200
Le 30 juillet 2019 16:11:19 GMT+02:00, Ricardo Wurmus <rekado <at> elephly.net> a écrit :
>
>Nicolò Balzarotti <anothersms <at> gmail.com> 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 = [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?




Information forwarded to guix-patches <at> gnu.org:
bug#36856; Package guix-patches. (Tue, 30 Jul 2019 14:25:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#36856; Package guix-patches. (Tue, 30 Jul 2019 14:34:02 GMT) Full text and rfc822 format available.

Message #20 received at 36856 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Julien Lepiller <julien <at> lepiller.eu>
Cc: 36856 <at> debbugs.gnu.org, anothersms <at> gmail.com
Subject: Re: [bug#36856] build: Add julia-build-system
Date: Tue, 30 Jul 2019 16:33:03 +0200
Julien Lepiller <julien <at> lepiller.eu> writes:

> Le 30 juillet 2019 16:11:19 GMT+02:00, Ricardo Wurmus <rekado <at> elephly.net> a écrit :
>>
>>Nicolò Balzarotti <anothersms <at> gmail.com> 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 = [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





Information forwarded to guix-patches <at> gnu.org:
bug#36856; Package guix-patches. (Tue, 30 Jul 2019 16:04:02 GMT) Full text and rfc822 format available.

Message #23 received at 36856 <at> debbugs.gnu.org (full text, mbox):

From: Nicolò Balzarotti <anothersms <at> gmail.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Julien Lepiller <julien <at> lepiller.eu>, 36856 <at> debbugs.gnu.org
Subject: Re: [bug#36856] build: Add julia-build-system
Date: Tue, 30 Jul 2019 16:02:39 +0000
[Message part 1 (text/plain, inline)]
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=/my/new/path/:/profile/path/:@stdlib julia --startup=no
-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 <at> elephly.net>
ha scritto:

>
> Julien Lepiller <julien <at> lepiller.eu> writes:
>
> > Le 30 juillet 2019 16:11:19 GMT+02:00, Ricardo Wurmus <
> rekado <at> elephly.net> a écrit :
> >>
> >>Nicolò Balzarotti <anothersms <at> gmail.com> 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 = [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
>
>
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36856; Package guix-patches. (Sat, 03 Aug 2019 10:05:02 GMT) Full text and rfc822 format available.

Message #26 received at 36856 <at> debbugs.gnu.org (full text, mbox):

From: Nicolò Balzarotti <anothersms <at> gmail.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Julien Lepiller <julien <at> lepiller.eu>, 36856 <at> debbugs.gnu.org
Subject: Re: [bug#36856] build: Add julia-build-system
Date: Sat, 3 Aug 2019 10:03:47 +0000
[Message part 1 (text/plain, inline)]
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ò

Il giorno mar 30 lug 2019 alle ore 16:02 Nicolò Balzarotti <
anothersms <at> 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=/my/new/path/:/profile/path/:@stdlib julia --startup=no
> -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 <at> elephly.net> ha scritto:
>
>>
>> Julien Lepiller <julien <at> lepiller.eu> writes:
>>
>> > Le 30 juillet 2019 16:11:19 GMT+02:00, Ricardo Wurmus <
>> rekado <at> elephly.net> a écrit :
>> >>
>> >>Nicolò Balzarotti <anothersms <at> gmail.com> 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 = [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
>>
>>
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36856; Package guix-patches. (Sat, 03 Aug 2019 10:05:02 GMT) Full text and rfc822 format available.

Message #29 received at 36856 <at> debbugs.gnu.org (full text, mbox):

From: Nicolò Balzarotti <anothersms <at> gmail.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Julien Lepiller <julien <at> lepiller.eu>, 36856 <at> debbugs.gnu.org
Subject: Re: [bug#36856] build: Add julia-build-system
Date: Sat, 3 Aug 2019 10:04:20 +0000
[Message part 1 (text/plain, inline)]
Yeah I forgot to attach the patches. Here we go

Il giorno sab 3 ago 2019 alle ore 10:03 Nicolò Balzarotti <
anothersms <at> gmail.com> ha scritto:

> 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ò
>
> Il giorno mar 30 lug 2019 alle ore 16:02 Nicolò Balzarotti <
> anothersms <at> 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=/my/new/path/:/profile/path/:@stdlib julia --startup=no
>> -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 <at> elephly.net> ha scritto:
>>
>>>
>>> Julien Lepiller <julien <at> lepiller.eu> writes:
>>>
>>> > Le 30 juillet 2019 16:11:19 GMT+02:00, Ricardo Wurmus <
>>> rekado <at> elephly.net> a écrit :
>>> >>
>>> >>Nicolò Balzarotti <anothersms <at> gmail.com> 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 = [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
>>>
>>>
[Message part 2 (text/html, inline)]
[0001-build-Add-julia-build-system.patch (text/x-patch, attachment)]
[0002-packages-julia-set-JULIA_LOAD_PATH-to-be-able-to-fin.patch (text/x-patch, attachment)]

Reply sent to Julien Lepiller <julien <at> lepiller.eu>:
You have taken responsibility. (Wed, 04 Sep 2019 20:22:01 GMT) Full text and rfc822 format available.

Notification sent to Nicolò Balzarotti <anothersms <at> gmail.com>:
bug acknowledged by developer. (Wed, 04 Sep 2019 20:22:02 GMT) Full text and rfc822 format available.

Message #34 received at 36856-done <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: Nicolò Balzarotti <anothersms <at> gmail.com>
Cc: Ricardo Wurmus <rekado <at> elephly.net>, 36856-done <at> debbugs.gnu.org
Subject: Re: [bug#36856] build: Add julia-build-system
Date: Wed, 4 Sep 2019 22:21:16 +0200
Hi Nicolò,

I've just pushed your patches as
a44a535ebecd40c52514623a44d31d927ecca9da and
11d73fb412d8728cf916eff9d9750be0bb593076. Sorry for the delay!

I took the liberty to remove some whitespace errors and transform tabs
into spaces, as well as changing the changelog from your second patch.

I'm closing this thread now, so please send your julia packages to a
new bug when they are ready (don't forget to fill in the description,
synopsis, and run guix lint :))

Julien

Le Sat, 3 Aug 2019 10:04:20 +0000,
Nicolò Balzarotti <anothersms <at> gmail.com> a écrit :

> Yeah I forgot to attach the patches. Here we go
> 
> Il giorno sab 3 ago 2019 alle ore 10:03 Nicolò Balzarotti <
> anothersms <at> gmail.com> ha scritto:  
> 
> > 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ò
> >
> > Il giorno mar 30 lug 2019 alle ore 16:02 Nicolò Balzarotti <  
> > anothersms <at> 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=/my/new/path/:/profile/path/:@stdlib julia
> >> > --startup=no  
> >> -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 <at> elephly.net> ha scritto:  
> >>  
> >>>
> >>> Julien Lepiller <julien <at> lepiller.eu> writes:
> >>>  
> >>> > Le 30 juillet 2019 16:11:19 GMT+02:00, Ricardo Wurmus <
> >>> rekado <at> elephly.net> a écrit :  
> >>> >>
> >>> >>Nicolò Balzarotti <anothersms <at> gmail.com> 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 = [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
> >>>
> >>>  





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 03 Oct 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 200 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.