Subject: [PATCH 1/2] build: julia: Add julia-package-dependencies as keyword.

From: Efraim Flashner <[email-masked]>
Date: Mon, 21 Feb 2022 14:51:20 +0200

* guix/build-system/julia.scm (link-depot): Accept
julia-package-dependencies keyword and use it for
julia-create-package-toml function.
(julia-build): Add julia-pacakge-dependencies.
* guix/build/julia-build-system.scm (julia-build): Add
julia-package-dependencies keyword.
---
 guix/build-system/julia.scm       | 5 ++++-
 guix/build/julia-build-system.scm | 7 ++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/guix/build-system/julia.scm b/guix/build-system/julia.scm
index 6261f8a55a..66eec65ef1 100644
--- a/guix/build-system/julia.scm
+++ b/guix/build-system/julia.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2021 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2021 Jean-Baptiste Volatier <[email-masked]>
 ;;; Copyright © 2021 Simon Tournier <[email-masked]>
+;;; Copyright © 2022 Efraim Flashner <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -88,6 +89,7 @@ (define* (julia-build name inputs
                       (guile #f)
                       (julia-package-name #f)
                       (julia-package-uuid #f)
+                      (julia-package-dependencies #f)
                       (imported-modules %julia-build-system-modules)
                       (modules '((guix build julia-build-system)
                                  (guix build utils))))
@@ -108,7 +110,8 @@ (define builder
                                                search-paths))
                        #:inputs #$(input-tuples->gexp inputs)
                        #:julia-package-name #$julia-package-name
-                       #:julia-package-uuid #$julia-package-uuid))))
+                       #:julia-package-uuid #$julia-package-uuid
+                       #:julia-package-dependencies #$julia-package-dependencies))))
 
   (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
                                                   system #:graft? #f)))
diff --git a/guix/build/julia-build-system.scm b/guix/build/julia-build-system.scm
index 03d669be64..fb524f03d7 100644
--- a/guix/build/julia-build-system.scm
+++ b/guix/build/julia-build-system.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2019, 2020 Nicolò Balzarotti <[email-masked]>
 ;;; Copyright © 2021 Jean-Baptiste Volatier <[email-masked]>
 ;;; Copyright © 2021, 2022 Simon Tournier <[email-masked]>
+;;; Copyright © 2022 Efraim Flashner <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -136,7 +137,8 @@ (define* (check #:key tests? source inputs outputs julia-package-name
                                package "/test/runtests.jl"))))))
 
 (define* (link-depot #:key source inputs outputs
-                     julia-package-name julia-package-uuid  #:allow-other-keys)
+                     julia-package-name julia-package-uuid
+                     julia-package-dependencies #:allow-other-keys)
   (let* ((out (assoc-ref outputs "out"))
          (name+version (strip-store-file-name out))
          (version (last (string-split name+version #\-)))
@@ -156,6 +158,7 @@ (define* (link-depot #:key source inputs outputs
         (julia-create-package-toml (getcwd)
                                    julia-package-name julia-package-uuid
                                    version
+                                   julia-package-dependencies
                                    #:file "Project.toml"))
 
     ;; When installing a package, julia looks first at in the JULIA_DEPOT_PATH
@@ -207,6 +210,7 @@ (define %standard-phases
     (delete 'build)))
 
 (define* (julia-build #:key inputs julia-package-name julia-package-uuid
+                      julia-package-dependencies
                       (phases %standard-phases)
                       #:allow-other-keys #:rest args)
   "Build the given Julia package, applying all of PHASES in order."
@@ -214,4 +218,5 @@ (define* (julia-build #:key inputs julia-package-name julia-package-uuid
          #:inputs inputs #:phases phases
          #:julia-package-name julia-package-name
          #:julia-package-uuid julia-package-uuid
+         #:julia-package-dependencies julia-package-dependencies
          args))
-- 
2.34.0