From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:48459) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5bn2-00085r-3c for guix-patches@gnu.org; Wed, 04 Sep 2019 16:22:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5bn0-0002SA-IW for guix-patches@gnu.org; Wed, 04 Sep 2019 16:22:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i5bn0-0002Ry-5l for guix-patches@gnu.org; Wed, 04 Sep 2019 16:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i5bmz-0004m2-Va for guix-patches@gnu.org; Wed, 04 Sep 2019 16:22:01 -0400 Subject: bug#36856: build: Add julia-build-system Resent-To: guix-patches@gnu.org Resent-Message-ID: Date: Wed, 4 Sep 2019 22:21:16 +0200 From: Julien Lepiller Message-ID: <20190904222116.72e27dcf@sybil.lepiller.eu> In-Reply-To: References: <87sgqn629k.fsf@elephly.net> <1DBAF4CE-8BA5-43EF-9CFE-5A73FB8118EB@lepiller.eu> <87o91b619c.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Cc: 36856-done@debbugs.gnu.org Hi Nicol=C3=B2, 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=C3=B2 Balzarotti a =C3=A9crit : > Yeah I forgot to attach the patches. Here we go >=20 > Il giorno sab 3 ago 2019 alle ore 10:03 Nicol=C3=B2 Balzarotti < > anothersms@gmail.com> ha scritto: =20 >=20 > > 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 < =20 > > anothersms@gmail.com> ha scritto: =20 > > =20 > >> 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: =20 > >> > JULIA_LOAD_PATH=3D/my/new/path/:/profile/path/:@stdlib julia > >> > --startup=3Dno =20 > >> -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 < =20 > >> rekado@elephly.net> ha scritto: =20 > >> =20 > >>> > >>> Julien Lepiller writes: > >>> =20 > >>> > Le 30 juillet 2019 16:11:19 GMT+02:00, Ricardo Wurmus < > >>> rekado@elephly.net> a =C3=A9crit : =20 > >>> >> > >>> >>Nicol=C3=B2 Balzarotti writes: > >>> >> =20 > >>> >>> 3. By adding a simple startup.jl script, inspired by what > >>> >>> emacs does. =20 > >>> >>This =20 > >>> >>> is simplified so I'm not sure it works for every corner case. > >>> >>> #+begin_src julia > >>> >>> let paths =3D [expanduser("~/.guix-profile"), =20 > >>> >>"/run/current-system/profile"] =20 > >>> >>> ("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 =20 > >>> >> > >>> >>Could this perhaps be handled by a profile hook that is > >>> >>included only when the profile manifest contains a julia > >>> >>package? =20 > >>> > > >>> > Or simply with an environment variable? GUIX_JULIA_PATH or > >>> > something? =20 > >>> > >>> 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 > >>> > >>> =20