From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8FObAktqVmB5UAAA0tVLHw (envelope-from ) for ; Sat, 20 Mar 2021 21:34:03 +0000 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id +IkgOkpqVmDKPgAA1q6Kng (envelope-from ) for ; Sat, 20 Mar 2021 21:34:02 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx2.migadu.com (Postfix) with ESMTPS id 515D6C8F8 for ; Sat, 20 Mar 2021 22:34:02 +0100 (CET) Received: from localhost ([::1]:39622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNjEP-0000GC-Ha for larch@yhetil.org; Sat, 20 Mar 2021 17:34:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNjDS-0008DC-Nk for guix-patches@gnu.org; Sat, 20 Mar 2021 17:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41698) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNjDS-0003D2-Fi for guix-patches@gnu.org; Sat, 20 Mar 2021 17:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNjDS-0004uU-Cd for guix-patches@gnu.org; Sat, 20 Mar 2021 17:33:02 -0400 Subject: bug#46195: [PATCH] Add julia-http with dependencies Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 21:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 46195 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Cc: 46195-done@debbugs.gnu.org Mail-Followup-To: 46195@debbugs.gnu.org, ludo@gnu.org, anothersms@gmail.com Received: via spool by 46195-done@debbugs.gnu.org id=D46195.161627598018855 (code D ref 46195); Sat, 20 Mar 2021 21:33:02 +0000 Received: (at 46195-done) by debbugs.gnu.org; 20 Mar 2021 21:33:00 +0000 Received: from localhost ([127.0.0.1]:53242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNjDP-0004u2-UP for submit@debbugs.gnu.org; Sat, 20 Mar 2021 17:33:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNjDO-0004tr-FQ for 46195-done@debbugs.gnu.org; Sat, 20 Mar 2021 17:32:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59505) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNjDI-00038f-Fv; Sat, 20 Mar 2021 17:32:52 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35020 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lNjDI-0008Mu-0V; Sat, 20 Mar 2021 17:32:52 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87v9be86kf.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> Date: Sat, 20 Mar 2021 22:32:50 +0100 In-Reply-To: <87v9be86kf.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> ("=?UTF-8?Q?Nicol=C3=B2?= Balzarotti"'s message of "Sat, 30 Jan 2021 22:21:04 +0100") Message-ID: <877dm14ikd.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616276042; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-to: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=30NYAjtQcZ4Izc/8/uayPn+AQWR9re+n56rW1P4AWVE=; b=RLV6MHygpCB64S4tqjmm7x2kHVTVh6mAjxpTTuMC3kMmu8YnUBucgn9wQpYX9pMBVDwnVy zUUqWje3+vfknubX3XCrfinD+cf6BZEIRNqjUcO/ehQES2nanPIonIUzRScOBnhmHbdgdl b3RWitTYwbxiuVSZ2fw3+d5bIZXK/AOAobcORjq8s8OvIjL9EX87d4JW4fAcAMmBvYciEG GS8ysZVEd4uip0jUb5r6x+KRPM9AfBIGb3Jid0w3fuXlBvjPIDwtrxWwedEtLHnSRU9bGu ducCYjO8mRXCxfpzJQO9iyQ98gAcpV5nGbxudvxLj/RqjpYsaRqCn4PLLv4F1g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616276042; a=rsa-sha256; cv=none; b=qYTdpqvV9eTEMHqYM2nJvPpJ9Y5mK9DxtaNiGDywB2t4yxhzHfFkhdjUqyUryuehP2toz2 h2j89HzDGmrMUWQpyUZq2fVBCqaLWaEWDtsPlLr9OvxfxTWzuPVNWKYzMaDF3aDvbPntQh rFrju02rLfQKcr3dvz35YlP195ju1uVpx9zSZMUmiAjENtlnukvcQut4YqeQfPBSPZmRJU Blv2nJUILbtJYpn8BsYiDj8SjdK79Y2obqEaAS005vNH+1hDGs2oyO0Br/ZvBnltDRMnYX 1eLKIGQK84TAeU0w+Uo90NMrH3i7Gy8TM91inHxSHP3raYMIjfZoWP2jqRyesQ== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=none; spf=pass (aspmx2.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.91 Authentication-Results: aspmx2.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx2.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 515D6C8F8 X-Spam-Score: -2.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0LeobupJB4mA Hi Nicol=C3=B2, Nicol=C3=B2 Balzarotti 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 =E2=80=9Cforeign function interface=E2=80=9D (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 a= ll > + (find-files "src/wrappers/" "\\.jl$")) > + #t)) > +@end lisp =E2=80=A6 where I =E2=80=9Cfixed=E2=80=9D indentation, used =E2=80=98for-ea= ch=E2=80=99 instead of =E2=80=98map=E2=80=99, and removed the trailing #t (it=E2=80=99s obsolescent). Thank you, and apologies for the delay! Ludo=E2=80=99.