From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 9hbYDg3OFWCdSgAA0tVLHw (envelope-from ) for ; Sat, 30 Jan 2021 21:22:21 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4Mz9CQ3OFWC/MgAAbx9fmQ (envelope-from ) for ; Sat, 30 Jan 2021 21:22:21 +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 aspmx1.migadu.com (Postfix) with ESMTPS id D4DEB940415 for ; Sat, 30 Jan 2021 21:22:19 +0000 (UTC) Received: from localhost ([::1]:54804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5xhC-0006hk-La for larch@yhetil.org; Sat, 30 Jan 2021 16:22:18 -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 Content-Type: multipart/mixed; boundary="=-=-=" 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.25 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=iM1UNIg3; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.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: D4DEB940415 X-Spam-Score: -1.25 X-Migadu-Scanner: scn0.migadu.com X-TUID: EA1pr74IyDL+ --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=C3=B2 [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/ec0d189551406b883259872611d913= defb5cd423/Project.toml#L8 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-doc-guix.texi-Fix-typo-in-julia-build-system.patch >From cd5c540f3bd238fa21d351b5f405aff600fad5a0 Mon Sep 17 00:00:00 2001 From: nixo Date: Sat, 30 Jan 2021 21:58:01 +0100 Subject: [PATCH 01/10] doc/guix.texi: Fix typo in julia-build-system. * doc/guix.texi (julia-build-system): replace argument wrongly named julia-file-name with the correct julia-package-name. --- doc/guix.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 405b218289..bb777707f0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -7619,7 +7619,7 @@ julia} packages, which essentially is similar to running @samp{julia -e Tests are run by calling @code{/test/runtests.jl}. The Julia package name is read from the file @file{Project.toml}. This -value can be overridden by passing the argument @code{#:julia-file-name} +value can be overridden by passing the argument @code{#:julia-package-name} (which must be correctly capitalized). For packages requiring shared library dependencies, you may need to write the -- 2.30.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-gnu-julia-xyz-julia-adapt-Set-file-name-according-to.patch >From fa665647736fb759646e1b53094690677c432a96 Mon Sep 17 00:00:00 2001 From: nixo Date: Sat, 30 Jan 2021 15:47:06 +0100 Subject: [PATCH 02/10] gnu: julia-xyz (julia-adapt): Set file-name according to standards. --- gnu/packages/julia-xyz.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm index 34dba958ce..c9e1d0df8c 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -32,7 +32,7 @@ (uri (git-reference (url "https://github.com/JuliaGPU/Adapt.jl") (commit (string-append "v" version)))) - (file-name "Adapt") + (file-name (git-file-name name version)) (sha256 (base32 "1lks6k3a1gvwlplld47nh6xfy3nnlpc0vhkzg6zg0qn33qdmavrg")))) (build-system julia-build-system) -- 2.30.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-gnu-Add-julia-benchmarktools.patch >From e7dcd1746d1cd9877928d867f516c81ff0e90034 Mon Sep 17 00:00:00 2001 From: nixo Date: Sat, 30 Jan 2021 15:47:29 +0100 Subject: [PATCH 03/10] gnu: Add julia-benchmarktools. * gnu/packages/julia-xyz.scm (julia-benchmarktools): New variable. --- gnu/packages/julia-xyz.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm index c9e1d0df8c..09043c593b 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -44,6 +44,28 @@ acts like @code{convert(T, x)}, but without the restriction of returning a be GPU compatible without throwing away the wrapper.") (license license:expat))) +(define-public julia-benchmarktools + (package + (name "julia-benchmarktools") + (version "0.5.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/JuliaCI/BenchmarkTools.jl") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0nsx21m3i5h22lkgyrmfj6r085va6ag40khwssqs8y7l0wz98lvp")))) + (build-system julia-build-system) + (propagated-inputs `(("julia-json" ,julia-json))) + (home-page "https://github.com/JuliaCI/BenchmarkTools.jl") + (synopsis "Benchmarking framework for the Julia language") + (description "@code{BenchmarkTools.jl} makes performance tracking of Julia +code easy by supplying a framework for writing and running groups of +benchmarks as well as comparing benchmark results.") + (license license:expat))) + (define-public julia-compat (package (name "julia-compat") -- 2.30.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-gnu-Add-julia-jllwrappers.patch >From 4e7ce2bb7f21f0b423407a298868b7561390053f Mon Sep 17 00:00:00 2001 From: nixo Date: Tue, 19 Jan 2021 11:23:10 +0100 Subject: [PATCH 04/10] gnu: Add julia-jllwrappers. * gnu/packages/julia-xyz.scm (julia-jllwrappers): New variable. * doc/guix.texi (julia-build-system): Document how to use jllwrappers to use to guix binary packages. --- doc/guix.texi | 28 +++++++++++++++++++++---- gnu/packages/julia-xyz.scm | 43 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index bb777707f0..eea1a1e0c9 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -7622,10 +7622,30 @@ The Julia package name is read from the file @file{Project.toml}. This value can be overridden by passing the argument @code{#:julia-package-name} (which must be correctly capitalized). -For packages requiring shared library dependencies, you may need to write the -@file{/deps/deps.jl} file manually. It's usually a line of @code{const -variable = /gnu/store/library.so} for each dependency, plus a void function -@code{check_deps() = nothing}. +Julia packages usually manage they binary dependencies via +@code{JLLWrappers.jl}, a Julia package that creates a module (named +after the wrapped library followed by @code{_jll.jl}. + +To add the binary path @code{_jll.jl} packages, you need to patch the +files under @file{src/wrappers/}, replacing the call to the macro +@code{JLLWrappers.@@generate_wrapper_header}, adding as a secound +argument containing the store path the binary. + +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 Some older packages that aren't using @file{Package.toml} yet, will require this file to be created, too. The function @code{julia-create-package-toml} diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm index 09043c593b..b89733c412 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -147,6 +147,49 @@ 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-jllwrappers + (package + (name "julia-jllwrappers") + (version "1.2.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/JuliaPackaging/JLLWrappers.jl") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1sj3mi2dcc13apqfpy401wic5n0pgbck1p98b2g3zw0mln9s83m4")))) + (arguments + ;; Wants to download stuff + '(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'custom-override-path + (lambda* (#:key inputs #:allow-other-keys) + ;; Make @generate_wrapper_header take an optional argument that + ;; guix packagers can pass to override the default "override" + ;; binary path. This won't be needed when something like + ;; https://github.com/JuliaPackaging/JLLWrappers.jl/pull/27 + ;; will be merged. + (substitute* "src/wrapper_generators.jl" + (("generate_wrapper_header.*") + "generate_wrapper_header(src_name, override_path = nothing)\n") + (("pkg_dir = .*" all) + (string-append + all "\n" "override = something(override_path," + "joinpath(dirname(pkg_dir), \"override\"))\n")) + (("@static if isdir.*") "@static if isdir($override)\n") + (("return joinpath.*") "return $override\n")) + #t))))) + (build-system julia-build-system) + (home-page "https://github.com/JuliaPackaging/JLLWrappers.jl") + (synopsis "Julia macros used by JLL packages") + (description "This package contains Julia macros that enable JLL packages +to generate themselves. It is not intended to be used by users, but rather is +used in autogenerated packages via @code{BinaryBuilder.jl}.") + (license license:expat))) + (define-public julia-json (package (name "julia-json") -- 2.30.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0005-gnu-Add-julia-mbedtls-jll.patch >From ee716b2a52933154b3fb5f0c12dc9cd5f5e965d6 Mon Sep 17 00:00:00 2001 From: nixo Date: Tue, 19 Jan 2021 11:23:37 +0100 Subject: [PATCH 05/10] gnu: Add julia-mbedtls-jll. * gnu/packages/julia-xyz.scm (julia-mbedtls-jll): New variable. --- gnu/packages/julia-xyz.scm | 43 +++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm index b89733c412..ab3497700a 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -20,7 +20,8 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix git-download) - #:use-module (guix build-system julia)) + #:use-module (guix build-system julia) + #:use-module (gnu packages tls)) (define-public julia-adapt (package @@ -215,6 +216,46 @@ used in autogenerated packages via @code{BinaryBuilder.jl}.") and printing JSON documents.") (license license:expat))) +(define-public julia-mbedtls-jll + (package + (name "julia-mbedtls-jll") + ;; version 2.25.0+0 is not compatible with current mbedtls 2.23.0, + ;; upgrade this when mbedtls is updated in guix + (version "2.24.0+1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/JuliaBinaryWrappers/MbedTLS_jll.jl") + (commit (string-append "MbedTLS-v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0kk9dlxdh7yms21npgrdfmjbj8q8ng6kdhrzw3jr2d7rp696kp99")))) + (build-system julia-build-system) + (arguments + '(#:tests? #f ; No runtests.jl + #:phases + (modify-phases %standard-phases + (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))))) + (inputs `(("mbedtls-apache" ,mbedtls-apache))) + (propagated-inputs `(("julia-jllwrappers" ,julia-jllwrappers))) + (home-page "https://github.com/JuliaBinaryWrappers/MbedTLS_jll.jl") + (synopsis "Apache's mbed TLS binary wrappers") + (description "This Julia module provides @code{mbed TLS} libraries and +wrappers.") + (license license:expat))) + (define-public julia-orderedcollections (package (name "julia-orderedcollections") -- 2.30.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0006-gnu-Add-julia-mbedtls.patch >From 05641a0e30b041ba819e2dec18483cc5baf80c98 Mon Sep 17 00:00:00 2001 From: nixo Date: Wed, 27 Jan 2021 00:35:20 +0100 Subject: [PATCH 06/10] gnu: Add julia-mbedtls. * gnu/packages/julia-xyz.scm (julia-mbedtls): New variable. --- gnu/packages/julia-xyz.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm index ab3497700a..9e0e41c844 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -216,6 +216,36 @@ used in autogenerated packages via @code{BinaryBuilder.jl}.") and printing JSON documents.") (license license:expat))) +(define-public julia-mbedtls + (package + (name "julia-mbedtls") + (version "1.0.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/JuliaLang/MbedTLS.jl") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0zjzf2r57l24n3k0gcqkvx3izwn5827iv9ak0lqix0aa5967wvfb")))) + (build-system julia-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'install 'disable-network-tests + ;; Tries to connect to httpbin.org + (lambda _ + (substitute* "test/runtests.jl" + (("testhost =") "return #")) + #t))))) + (propagated-inputs `(("julia-mbedtls-jll" ,julia-mbedtls-jll))) + (home-page "https://github.com/JuliaLang/MbedTLS.jl") + (synopsis "Apache's mbed TLS library wrapper") + (description "@code{MbedTLS.jl} provides a wrapper around the @code{mbed +TLS} and cryptography C libary for Julia.") + (license license:expat))) + (define-public julia-mbedtls-jll (package (name "julia-mbedtls-jll") -- 2.30.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0007-gnu-Add-julia-uris.patch >From efbf8fe2a9b6cf24afebd2c9927341305b2403b7 Mon Sep 17 00:00:00 2001 From: nixo Date: Tue, 19 Jan 2021 11:44:51 +0100 Subject: [PATCH 07/10] gnu: Add julia-uris. * gnu/packages/julia-xyz.scm (julia-uris): New variable. --- gnu/packages/julia-xyz.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm index 9e0e41c844..6021a6ff7a 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -352,3 +352,37 @@ languages like Fortran.") (description "@code{Parsers.jl} is a collection of type parsers and utilities for Julia.") (license license:expat))) + +(define-public julia-uris + (package + (name "julia-uris") + (version "1.2.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/JuliaWeb/URIs.jl") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0fqyagsqks5za7m0czafr34m2xh5501f689k9cn5x3npajdnh2r3")))) + (build-system julia-build-system) + (arguments + '(#:julia-package-name "URIs" ;required to run tests + #:phases + (modify-phases %standard-phases + (add-before 'check 'change-dir + ;; Tests must be run from the testdir + (lambda* (#:key source outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (chdir + (string-append out "/share/julia/packages/URIs/test"))) + #t))))) + ;; required for tests + (inputs `(("julia-json" ,julia-json))) + (home-page "https://github.com/JuliaWeb/URIs.jl") + (synopsis "URI parsing in Julia") + (description "@code{URIs.jl} is a Julia package that allows parsing and +working with @acronym{URIs,Uniform Resource Identifiers}, as defined in RFC +3986.") + (license license:expat))) -- 2.30.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0008-gnu-Add-julia-inifile.patch >From 6e08c819ed47d2ae8807bbb8979e77093f537e1d Mon Sep 17 00:00:00 2001 From: nixo Date: Tue, 19 Jan 2021 12:02:38 +0100 Subject: [PATCH 08/10] gnu: Add julia-inifile. * gnu/packages/julia-xyz.scm (julia-inifile): New variable. --- gnu/packages/julia-xyz.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm index 6021a6ff7a..738060f865 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -148,6 +148,26 @@ 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-inifile + (package + (name "julia-inifile") + (version "0.5.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/JuliaIO/IniFile.jl") + (commit "8ba59958495fa276d6489d2c3903e765d75e0bc0"))) + (file-name (git-file-name name version)) + (sha256 + (base32 "11h6f99jpbg729lplw841m68jprka7q3n8yw390bndlmcdsjabpd")))) + (build-system julia-build-system) + (home-page "https://github.com/JuliaIO/IniFile.jl") + (synopsis "Reading Windows-style INI files") + (description "This is a Julia package that defines an IniFile type that +allows to interface with @file{.ini} files.") + (license license:expat))) + (define-public julia-jllwrappers (package (name "julia-jllwrappers") -- 2.30.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0009-gnu-Add-julia-bufferedstreams.patch >From ed48a42be449e43e785b45ba296e4abbd7ac4d89 Mon Sep 17 00:00:00 2001 From: nixo Date: Tue, 19 Jan 2021 12:08:27 +0100 Subject: [PATCH 09/10] gnu: Add julia-bufferedstreams. * gnu/packages/julia-xyz.scm (julia-bufferedstreams): New variable. --- gnu/packages/julia-xyz.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm index 738060f865..a3c5c55a86 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -67,6 +67,34 @@ code easy by supplying a framework for writing and running groups of benchmarks as well as comparing benchmark results.") (license license:expat))) +(define-public julia-bufferedstreams + (package + (name "julia-bufferedstreams") + (version "1.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/BioJulia/BufferedStreams.jl") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0sf4sxbq55mg2pwxyxf0c839z1lk0yxg8nmb7617bfbvw31cp88z")))) + (build-system julia-build-system) + ;; The package is old and tests are using undefined functions. They also + ;; freeze, see + ;; https://travis-ci.org/BioJulia/BufferedStreams.jl/jobs/491050182 + (arguments + '(#:tests? #f + #:julia-package-name "BufferedStreams")) + (propagated-inputs `(("julia-compat" ,julia-compat))) + (home-page "https://github.com/BioJulia/BufferedStreams.jl") + (synopsis "Fast composable IO streams") + (description "@code{BufferedStreams.jl} provides buffering for IO +operations. It can wrap any @code{IO} type automatically making incremental +reading and writing faster.") + (license license:expat))) + (define-public julia-compat (package (name "julia-compat") -- 2.30.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0010-gnu-Add-julia-http.patch >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 --=-=-=--