From patchwork Sat Jan 30 21:21:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Nicol=C3=B2_Balzarotti?= X-Patchwork-Id: 26754 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3955D27BC1D; Sat, 30 Jan 2021 21:22:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B1D7127BC1E for ; Sat, 30 Jan 2021 21:22:18 +0000 (GMT) Received: from localhost ([::1]:54804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5xhB-0006hk-NV for patchwork@mira.cbaines.net; Sat, 30 Jan 2021 16:22:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5xgw-0006hY-Us for guix-patches@gnu.org; Sat, 30 Jan 2021 16:22:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:44358) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5xgw-0001SJ-MM for guix-patches@gnu.org; Sat, 30 Jan 2021 16:22:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l5xgw-0007H9-Hd for guix-patches@gnu.org; Sat, 30 Jan 2021 16:22:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46195] [PATCH] Add julia-http with dependencies Resent-From: =?utf-8?q?Nicol=C3=B2?= Balzarotti Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 Jan 2021 21:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46195 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46195@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161204168227920 (code B ref -1); Sat, 30 Jan 2021 21:22:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Jan 2021 21:21:22 +0000 Received: from localhost ([127.0.0.1]:55904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5xgD-0007GA-LZ for submit@debbugs.gnu.org; Sat, 30 Jan 2021 16:21:22 -0500 Received: from lists.gnu.org ([209.51.188.17]:48942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l5xg8-0007G0-TM for submit@debbugs.gnu.org; Sat, 30 Jan 2021 16:21:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5xg8-0006YV-N6 for guix-patches@gnu.org; Sat, 30 Jan 2021 16:21:12 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:38930) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5xg5-00010D-A1 for guix-patches@gnu.org; Sat, 30 Jan 2021 16:21:12 -0500 Received: by mail-wr1-x433.google.com with SMTP id a1so12476834wrq.6 for ; Sat, 30 Jan 2021 13:21:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=0HEOXVtNe+NfuzWBD8tIf8AL3Ncfg2B2g7gROhZ5R88=; b=iM1UNIg3KgVQC9h6V2mMWxy7/GI5TnHbPuM73RUCjXBk6SiyoMSgVowGAPkVbL4Y/H 5u50taHZn6WBWPDRI+GwGjJD1P7y/tqkeODab/26W+EOoDjG7M/r2onIqL5GjYa9A1Ht 5tHVWac1ddJ5fqLLjRPx6i9HscgUKzPqKFVikT9ktGq9W/ElAluCahN+t8WbTJvFpDwW +DBmp6X59i82dWM6Jm9inFNN9pGDKBCFUtmOssfEZ2kNhOZDnf2vp1+I5SVEiRL/CHcb e1epx43BuX6VG16c3H6HEKy2PBDMFWmifIpq0JIOdZ2S+1COXnGZH2mYdxykqjvnT+/P fV3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=0HEOXVtNe+NfuzWBD8tIf8AL3Ncfg2B2g7gROhZ5R88=; b=S/hdxCAutOblKoDg7xQ+bjupI5zmCJW0BFe9bmuiJ8WrcH1sjEdqATK5gjadxdTcp4 tf4kmKPScisHaUyDL6GSLwFJSZQiBq+MPaPFu79PB3tpIbCEkaQSQepdjuESp19v9jpI sCI1zf1BfdzFqBrvL6TUl3V3dKNK4eOuI6jBa44Z/0zO+pwG4Bp+7P55Bm4bRCFtK5b1 8oMAxtLvlEoPe7Zi6GsfQl2kv14BL6kTRRWTelBTjM5zqb/zYpbNFXdTrbtQRiyxjhSJ dou4JGwubhTeZ8KXTcAFcGoqltUHVfrj4rRYQAE7CqLdMbqBvAwKK1Tya3UrFilBjcSj wzLA== X-Gm-Message-State: AOAM5302GgeBF0uIRJBBm178zdhhqYq379JO1ZRxM0QrZqV8yJv0sTjY D1EFQMWUXG2CjAR9iZ3jEeS32FDUykM= X-Google-Smtp-Source: ABdhPJyuZ+6yfhq5vMZ1Z3JwHG/LtM4vAUjLzhIgtZhymcwAa9OKf8EcEHH6iRaNgXP+0a2kj+86CA== X-Received: by 2002:a5d:4242:: with SMTP id s2mr11158645wrr.108.1612041667271; Sat, 30 Jan 2021 13:21:07 -0800 (PST) Received: from guixSD (host-87-4-165-57.retail.telecomitalia.it. [87.4.165.57]) by smtp.gmail.com with ESMTPSA id s19sm22144874wrf.72.2021.01.30.13.21.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jan 2021 13:21:06 -0800 (PST) From: =?utf-8?q?Nicol=C3=B2?= Balzarotti Date: Sat, 30 Jan 2021 22:21:04 +0100 Message-ID: <87v9be86kf.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=anothersms@gmail.com; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi guix! Here's my second set of patches adding Julia packages. 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). 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. (Also, somehow I managed to add to errors in previous patches (wrong arugment name in build system, wrong file name in julia-adapt, which I fixed now. I'm really sorry) Thanks again! Nicolò [fn:1] https://github.com/JuliaPackaging/JLLWrappers.jl [fn:2] https://github.com/JuliaBinaryWrappers/MbedTLS_jll.jl [fn:3] https://github.com/JuliaLang/MbedTLS.jl/blob/ec0d189551406b883259872611d913defb5cd423/Project.toml#L8 From 5131c1274f7b30e7e04a831533b9bee193df429a Mon Sep 17 00:00:00 2001 From: nixo Date: Tue, 19 Jan 2021 13:29:00 +0100 Subject: [PATCH 10/10] gnu: Add julia-http. * gnu/packages/julia-xyz.scm (julia-http): New variable. --- gnu/packages/julia-xyz.scm | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm index a3c5c55a86..0d35cbde57 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -176,6 +176,64 @@ scaled by a constant factor. Consequently, they have a fixed number of digits (bits) after the decimal (radix) point.") (license license:expat))) +(define-public julia-http + (package + (name "julia-http") + (version "0.9.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/JuliaWeb/HTTP.jl") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0ij0yci13c46p92m4zywvcs02nn8pm0abyfffiyhxvva6hq48lyl")))) + (build-system julia-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'install 'disable-network-tests + (lambda _ + (substitute* "test/runtests.jl" + (("\"async.jl") "# \"async.jl") + (("\"client.jl") "# \"client.jl")) + (substitute* "test/aws4.jl" + (("@testset.*HTTP.request with AWS authentication.*" all) + (string-append all "return\n"))) + (substitute* "test/insert_layers.jl" + (("@testset.*Inserted final layer runs handler.*" all) + (string-append all "return\n"))) + (substitute* "test/multipart.jl" + (("@testset \"Setting of Content-Type.*" all) + (string-append all "return\n")) + (("@testset \"Deprecation of .*" all) + (string-append all "return\n"))) + (substitute* "test/websockets.jl" + (("@testset.*External Host.*" all) + (string-append all "return\n"))) + (substitute* "test/messages.jl" + (("@testset.*Read methods.*" all) + (string-append all "return\n")) + (("@testset.*Body - .*" all) + (string-append all "return\n")) + (("@testset.*Write to file.*" all) + (string-append all "return\n"))) + #t))))) + (propagated-inputs + `(("julia-inifile" ,julia-inifile) + ("julia-mbedtls" ,julia-mbedtls) + ("julia-uris" ,julia-uris))) + ;; required for tests + (inputs + `(("julia-json" ,julia-json) + ("julia-bufferedstreams" ,julia-bufferedstreams))) + (home-page "https://juliaweb.github.io/HTTP.jl/") + (synopsis "HTTP support for Julia") + (description "@code{HTTP.jl} is a Julia library for HTTP Messages, +implementing both a client and a server.") + (license license:expat))) + (define-public julia-inifile (package (name "julia-inifile") -- 2.30.0