Subject: [bug#38546] [PATCH 09/11] gnu: Add julia-binaryprovider.

From: nixo <[email-masked]>
Date: Sat, 18 Jan 2020 14:07:36 +0100

* gnu/packages/julia-xyz.scm (julia-binaryprovider): New variable.
---
 gnu/packages/julia-xyz.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 92ffde58e7..0f8e04b4d1 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -68,3 +68,36 @@ allows to interface with @file{.ini} files")
 function takes in either an @code{Array{UInt8}}, a @code{ByteString} or an
 @code{IO} object.")
     (license license:expat)))
+
+(define-public julia-binaryprovider
+  (package
+    (name "julia-binaryprovider")
+    (version "0.5.8")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/JuliaPackaging/BinaryProvider.jl")
+             (commit (string-append "v" version))))
+       (file-name "BinaryProvider")
+       (sha256
+        (base32 "174jmg4w8ncgfhdvfnm0p4cnlayw31j4s9sksqlwz1sipywqvww7"))))
+    (propagated-inputs `(("julia-sha" ,julia-sha)))
+    ;; We don't really need BinaryProvider (as guix provides the binaries) but
+    ;; since it's a dependency of other packages we want to precompile it.
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-engine-probe
+           (lambda _
+             (substitute* "src/BinaryProvider.jl"
+               ;; Precompilation tries to download things from the internet,
+               ;; disable the download part
+               (("probe_platform_engines") "# probe_platform_engines"))
+             #t)))))
+    (build-system julia-build-system)
+    (home-page "https://github.com/JuliaPackaging/BinaryProvider.jl")
+    (synopsis "Reliable Binary provider for Julia")
+    (description "@code{BinaryProvider.jl} simplifies the installation of
+binaries required by julia packages.")
+    (license license:expat)))
-- 
2.24.1