guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#36856] build: Add julia-build-system


From: Nicolò Balzarotti
Subject: [bug#36856] build: Add julia-build-system
Date: Tue, 30 Jul 2019 12:49:43 +0000

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ò!

Attachment: 0001-build-Add-julia-build-system.patch
Description: Text Data

Attachment: 0002-add-many-julia-packages.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]