From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:42798) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isoGj-0001Mv-RV for guix-patches@gnu.org; Sat, 18 Jan 2020 08:36:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1isoGi-0004rQ-Db for guix-patches@gnu.org; Sat, 18 Jan 2020 08:36:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34731) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1isoGi-0004rD-AD for guix-patches@gnu.org; Sat, 18 Jan 2020 08:36:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1isoGi-00078W-8B for guix-patches@gnu.org; Sat, 18 Jan 2020 08:36:04 -0500 Subject: [bug#38546] [PATCH 10/11] gnu: Add julia-mbedtls. References: <87v9qpvbyr.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> In-Reply-To: <87v9qpvbyr.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> Resent-Message-ID: From: nixo Date: Sat, 18 Jan 2020 14:11:14 +0100 Message-ID: <87d0bgvqe9.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain 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: 38546@debbugs.gnu.org * gnu/packages/julia-xyz.scm (julia-mbedtls): New variable. --- gnu/packages/julia-xyz.scm | 49 +++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm index 0f8e04b4d1..3e9f532697 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -2,7 +2,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-compat (package @@ -101,3 +102,49 @@ function takes in either an @code{Array{UInt8}}, a @code{ByteString} or an (description "@code{BinaryProvider.jl} simplifies the installation of binaries required by julia packages.") (license license:expat))) + +(define-public julia-mbedtls + (package + (name "julia-mbedtls") + (version "0.7.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/JuliaLang/MbedTLS.jl") + (commit (string-append "v" version)))) + (file-name "MbedTLS") + (sha256 + (base32 "1a8snw9gi21lm6r3kh6ly7ngi99s9k5shqkfiizj3g9li20q23h2")))) + (propagated-inputs + `(("julia-binaryprovider" ,julia-binaryprovider) + ("mbedtls-apache" ,mbedtls-apache))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'precompile 'build-deps + (lambda* (#:key outputs source inputs #:allow-other-keys) + (let ((f (open-file + (string-append + (assoc-ref outputs "out") + "/share/julia/packages/" + (string-append + (strip-store-file-name source) "/deps/deps.jl")) + "w"))) + (display (string-append "const libmbedcrypto = \"" + (assoc-ref inputs "mbedtls-apache") + "/lib/libmbedcrypto.so\"\n") f) + (display (string-append "const libmbedtls = \"" + (assoc-ref inputs "mbedtls-apache") + "/lib/libmbedtls.so\"\n") f) + (display (string-append "const libmbedx509 = \"" + (assoc-ref inputs "mbedtls-apache") + "/lib/libmbedx509.so\"\n") f) + (close-port f)) + #t))))) + (build-system julia-build-system) + (home-page "https://github.com/JuliaLang/MbedTLS.jl") + (synopsis "Apache's mbed TLS library wrapper") + (description "@code{MbedTLS.jl} provides a wrapper around the mbed TLS and +cryptography C libary for Julia.") + (license license:expat))) -- 2.24.1