From: "Ludovic Courtès" <ludo@gnu.org>
To: "Nicolò Balzarotti" <anothersms@gmail.com>
Cc: 46195-done@debbugs.gnu.org
Subject: bug#46195: [PATCH] Add julia-http with dependencies
Date: Sat, 20 Mar 2021 22:32:50 +0100 [thread overview]
Message-ID: <877dm14ikd.fsf@gnu.org> (raw)
In-Reply-To: <87v9be86kf.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> ("Nicolò Balzarotti"'s message of "Sat, 30 Jan 2021 22:21:04 +0100")
Hi Nicolò,
Nicolò Balzarotti <anothersms@gmail.com> skribis:
> This time one package (julia-mbedtls-jll) requires a shared library
> (mbedtls-apache). The most recent way (threre has been a few during the
> years) Julia packages use to ship binaries is by using jllwrappers
> [fn:1], which generates package_jll (e.g. mbedtls-jll [fn:2]), a Julia
> package which is then included by the real Julia package (e.g. mbedtls
> [fn:3]). Jllwrappers usually downloads prebuild binaries. There's an
> override mechanism (creating a folder named "override" under the julia
> module dir).
So JLL is a “foreign function interface” (FFI), right?
> They recently added an easiesr way to override this behaviour
> (https://github.com/JuliaPackaging/JLLWrappers.jl/pull/27), but this
> will be available on julia 1.6+.
>
> In the meanwhile I see two ways around this:
> - symlinking deps into
> /gnu/store/...julia-packagename-jll/[...]/override
> - patching both jllwrappers to support a custom override path, and then
> patching the jllwrapper call inside each package-jll so that the
> library/binary is searched in the correct directory.
>
> I do like this second approach more (but I don't have a strong opinion
> on this), so in this patchset I patched @generate_wrapper_header macro,
> so that it takes an optional parameter with the overidden library path.
> While we wait for julia 1.6, the way to use this is (like I'm doing in
> mbedtls-jll) to add the path to the library the generate_wrapper_header
> call, and everything works fine. I also added the relative
> documentation. If you think symlinking is a better approach, let me
> know so that I can update this patch set.
Sounds reasonable to me.
I pushed the whole series, tweaking one or two commit logs; I also took
the liberty to adjust this example:
> +The package @code{MbetTLS} can be taken as an example:
> +@lisp
> +(add-after 'unpack 'override-binary-path
> + (lambda* (#:key inputs #:allow-other-keys)
> + (map
> + (lambda (wrapper)
> + (substitute* wrapper
> + (("generate_wrapper_header.*")
> + (string-append
> + "generate_wrapper_header(\"MbedTLS\", \""
> + (assoc-ref inputs "mbedtls-apache") "\")\n"))))
> + ;; There's a Julia file for each platform, override them all
> + (find-files "src/wrappers/" "\\.jl$"))
> + #t))
> +@end lisp
… where I “fixed” indentation, used ‘for-each’ instead of ‘map’, and
removed the trailing #t (it’s obsolescent).
Thank you, and apologies for the delay!
Ludo’.
next prev parent reply other threads:[~2021-03-20 21:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-30 21:21 [bug#46195] [PATCH] Add julia-http with dependencies Nicolò Balzarotti
2021-03-20 21:32 ` Ludovic Courtès [this message]
2021-03-20 22:33 ` Nicolò Balzarotti
2021-03-20 22:37 ` Nicolò Balzarotti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877dm14ikd.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=46195-done@debbugs.gnu.org \
--cc=anothersms@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).