mbox series

[bug#38546,0/3] Julia: fix package build and add julia-xyz

Message ID 87v9qpvbyr.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me
Headers show
Series Julia: fix package build and add julia-xyz | expand

Message

Nicolò Balzarotti Dec. 9, 2019, 1:36 p.m. UTC
Hello Guix!

Changes:

This set of patches improve the state of julia-build-system.

1. set path JULIA_LOAD_PATH to enable installing packages, and
  JULIA_DEPOT_PATH to allow guix-precompiled cache to be recognized by julia. To
  do this, a small "hack" with libfaketime was required (julia decides if the
  cache is valid by comparing source ".jl" mtime with cache ".ji" file, in which
  julia stores a timestamp. We need to force this timestamp to be equal to the
  mtime of guix-store files).
2. Enable package tests
3. Add a first package (julia-compat) definition. If this is fine, I'll start
   pushing many many more (I have them ready, but I need to update many of them)



 Thanks! :)

One note: with this PATH changes, julia will not be able to find packages
installed by Julia Pkg3.jl anymore. This is expected (it should happen for R,
python, emacs... too) but since we still need to merge the packages, this
patch renders julia pretty unusable. The workaround is for users to add to
JULIA_LOAD_PATH and JULIA_LOAD_PATH local user-writable folders, activate a
profile, and then install packages manually:

#+begin_src bash
   JULIA_LOAD_PATH=/tmp/julia:$JULIA_LOAD_PATH JULIA_DEPOT_PATH=/tmp/julia:$JULIA_DEPOT_PATH julia
#+end_src

nixo (3):
 gnu: julia: Set to JULIA_LOAD_PATH and JULIA_DEPOT_PATH variables.
 gnu: julia-build-system: Enable tests.
 gnu: julia-xyz: Add julia-compat.

#+begin_src julia
   using Pkg
   Pkg.activate("/tmp/julia")
   Pkg.add("PACKAGE_NAME")
#+end_src

Comments

Ludovic Courtès Dec. 15, 2019, 9:40 p.m. UTC | #1
Hi!

nixo <anothersms@gmail.com> skribis:

> This set of patches improve the state of julia-build-system.
>
> 1. set path JULIA_LOAD_PATH to enable installing packages, and
>   JULIA_DEPOT_PATH to allow guix-precompiled cache to be recognized by julia. To

These two environment variables are supported upstream, right?

>   do this, a small "hack" with libfaketime was required (julia decides if the
>   cache is valid by comparing source ".jl" mtime with cache ".ji" file, in which
>   julia stores a timestamp. We need to force this timestamp to be equal to the
>   mtime of guix-store files).

OK.  This hack shouldn’t break “normal” Julia uses (outside of the
store), right?

Ludo’.