gnu: Add julia-mbedtls.

* gnu/packages/julia-xyz.scm (julia-mbedtls-0.7.0): New variable.
This commit is contained in:
nixo 2019-10-10 20:49:03 +02:00
parent fc7236602a
commit e956eda65d
1 changed files with 46 additions and 1 deletions

View File

@ -20,7 +20,8 @@
#:use-module (guix build-system julia)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages))
#:use-module (guix packages)
#:use-module (gnu packages tls))
(define-public julia-inifile
(package
@ -119,3 +120,47 @@ function takes in either an Array{UInt8}, a ByteString or an IO object.")
(synopsis "A reliable binary provider for Julia")
(description "Install binary packages with Julia.")
(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/JuliaWeb/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/JuliaWeb/MbedTLS.jl")
(synopsis "Wrapper around the mbed TLS and cryptography C libary")
(description "@code{julia-mbedtls} is a julia wrapper around mbed TLS.")
(license license:expat)))