guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: Add julia-sundials-jull


From: guix-commits
Subject: 01/02: gnu: Add julia-sundials-jull
Date: Tue, 16 Nov 2021 08:34:00 -0500 (EST)

efraim pushed a commit to branch master
in repository guix.

commit 546f8537aad3ac03fef43e036d3cab3abc943915
Author: Jean-Baptiste Volatier <jbv@pm.me>
AuthorDate: Fri Nov 12 14:24:05 2021 +0000

    gnu: Add julia-sundials-jull
    
    * gnu/packages/julia-jll.scm (julia-sundials-jll): New variable.
    * gnu/packages/maths.scm (sundials-julia): New variable.
    
    Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
---
 gnu/packages/julia-jll.scm | 39 +++++++++++++++++++++++++++++++++++++++
 gnu/packages/maths.scm     | 25 +++++++++++++++++++++++++
 2 files changed, 64 insertions(+)

diff --git a/gnu/packages/julia-jll.scm b/gnu/packages/julia-jll.scm
index d8cf5b9..3f2b0c1 100644
--- a/gnu/packages/julia-jll.scm
+++ b/gnu/packages/julia-jll.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
 ;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2759,3 +2760,41 @@ build tree Yggdrasil.")
     (synopsis "Zstd library wrappers")
     (description "This package provides a wrapper for the zstd library.")
     (license license:expat)))
+
+(define-public julia-sundials-jll
+  (package
+    (name "julia-sundials-jll")
+    (version "5.2.1+0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/JuliaBinaryWrappers/Sundials_jll.jl";)
+               (commit (string-append "Sundials-v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32 "0cijb9frq8gj8bjpqf2lr5d0jxlj262y6h6xi4z3536dingrvffc"))))
+    (build-system julia-build-system)
+    (arguments
+     '(#:tests? #f  ; no runtests
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'link-depot 'override-binary-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (map
+               (lambda (wrapper)
+                 (substitute* wrapper
+                   (("global artifact_dir.*")
+                    (string-append
+                     "global artifact_dir = \""
+                      (assoc-ref inputs "sundials") "\"\n"))))
+               ;; There's a Julia file for each platform, override them all
+               (find-files "src/wrappers/" "\\.jl$")))))))
+    (inputs
+     `(("sundials" ,sundials-julia)))
+    (propagated-inputs
+     `(("julia-jllwrappers" ,julia-jllwrappers)))
+    (home-page "https://github.com/JuliaBinaryWrappers/Sundials_jll.jl";)
+    (synopsis "SUndials library wrappers")
+    (description "This package provides a wrapper for the sundials library.")
+    (license license:expat)))
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 5152fe6..a6fe2b5 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -6159,6 +6159,31 @@ easily be incorporated into existing simulation codes.")
             ,%openmpi-setup)))))
     (synopsis "SUNDIALS with OpenMPI support")))
 
+(define-public sundials-julia
+  (package
+    (inherit sundials)
+    (name "sundials-julia")
+    (version "5.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/LLNL/sundials";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0nx4sqhmi126m14myzm7syv2053harav9snl0a247wnkcgs5rxrv"))))
+    (inputs
+     `(("lapack" ,lapack)
+       ,@(package-inputs sundials)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments sundials)
+       ((#:configure-flags flags '())
+        `(cons* "-DLAPACK_ENABLE:BOOL=ON"
+                ,flags))))
+    (synopsis "SUNDIALS with lapack support as required by 
julia-sundials-jll")))
+
 (define-public combinatorial-blas
   (package
     (name "combinatorial-blas")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]